docstr: Create a sparse matrix in coo format.
  *vals*: arrays of values of non-null entries of the matrix
  *rows*: int arrays of rows of non-null entries of the matrix
  *cols*: int arrays of cols of non-null entries of the matrix
  *shape*: 2-tuple (n, m) of matrix shape
docstr_tok: ["Create","a","sparse","matrix","in","coo","format",".","*","vals","*",":","arrays","of","values","of","non-null","entries","of","the","matrix","*","rows","*",":","int","arrays","of","rows","of","non-null","entries","of","the","matrix","*","cols","*",":","int","arrays","of","cols","of","non-null","entries","of","the","matrix","*","shape","*",":","2-tuple","(","n",",","m",")","of","matrix","shape"]
code: def __init__(self, vals, rows, cols, shape):
      """
      Create a sparse matrix in coo format.
      *vals*: arrays of values of non-null entries of the matrix
      *rows*: int arrays of rows of non-null entries of the matrix
      *cols*: int arrays of cols of non-null entries of the matrix
      *shape*: 2-tuple (n, m) of matrix shape
      """
      self.n, self.m = shape
      self.vals = np.asarray(vals, dtype=np.float64)
      self.rows = np.asarray(rows, dtype=np.int32)
      self.cols = np.asarray(cols, dtype=np.int32)
  
imports: import numpy
  from matplotlib import _api
  from matplotlib.tri import Triangulation
  from matplotlib.tri._trifinder import TriFinder
  from matplotlib.tri._tritools import TriAnalyzer
label_desc: Use image node_id 1 to create a new _Sparse_Matrix_coo object  with example: obj = _Sparse_Matrix_coo(vals, rows, cols, shape)