bundles / scipy 1.17.1 / scipy / sparse / _extract / find
function
scipy.sparse._extract:find
source: /scipy/sparse/_extract.py :13
Signature
def find ( A ) Summary
Return the indices and values of the nonzero elements of a matrix
Parameters
A: dense or sparse array or matrixMatrix whose nonzero elements are desired.
Returns
(I,J,V): tuple of arraysI,J, and V contain the row indices, column indices, and values of the nonzero entries.
Examples
from scipy.sparse import csr_array, find A = csr_array([[7.0, 8.0, 0],[0, 0, 9.0]])✓
find(A)
✗Aliases
-
scipy.sparse.find