scipy.sparse.find

scipy.sparse.find(A)

Return the indices and values of the nonzero elements of a matrix

Parameters :

A : dense or sparse matrix

Matrix whose nonzero elements are desired.

Returns :

(I,J,V) : tuple of arrays

I,J, and V contain the row indices, column indices, and values of the nonzero matrix entries.

Previous topic

scipy.sparse.eye

Next topic

scipy.sparse.hstack

This Page