#NEWLINE# def _csr_matrix_indices( S ) : #NEWLINE# #INDENT# '\n    Generate the indices of nonzero entries of a csr_matrix S\n\n    ' #NEWLINE# ( m , n ) = S . shape #NEWLINE# for i in range ( m ) : #NEWLINE# #INDENT# for j in range ( S . indptr [ i ] , S . indptr [ ( i + 1 ) ] ) : #NEWLINE# #INDENT# ( row_index , col_index ) = ( i , S . indices [ j ] ) #NEWLINE# ( yield ( row_index , col_index ) )