code: def find(A):
      """Return the indices and values of the nonzero elements of a matrix
  
      Parameters
      ----------
      A : dense or sparse array or 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 entries.
  
  
      Examples
      --------
      >>> from scipy.sparse import csr_array, find
      >>> A = csr_array([[7.0, 8.0, 0],[0, 0, 9.0]])
      >>> find(A)
      (array([0, 0, 1], dtype=int32),
       array([0, 1, 2], dtype=int32),
       array([ 7.,  8.,  9.]))
  
      """
  
      A = coo_array(A, copy=True)
      A.sum_duplicates()
      # remove explicit zeros
      nz_mask = A.data != 0
      return A.row[nz_mask], A.col[nz_mask], A.data[nz_mask]
  
imports: from ._coo import coo_matrix, coo_array
  from ._base import sparray
label_desc: Use image node_id 1 for calling a global function with example usage: find(A) and returns: A,  A,  A