class_docstr: Represents data from sparse array include scipy sparse or cupy sparse matrix.
class_docstr_tok: ["Represents","data","from","sparse","array","include","scipy","sparse","or","cupy","sparse","matrix","."]
code: def __init__(self, data=None, **kw):
      kw["sparse"] = True
      if is_cupy(data):  # pragma: no cover
          kw["gpu"] = True
      super().__init__(data=data, **kw)
  
imports: import numpy
  from ...None import opcodes
  from ...lib.sparse.core import issparse, get_array_module, cp, cps, sps
  from ...lib.sparse import SparseNDArray
  from ...serialization.serializables import FieldTypes, AnyField, NDArrayField, TupleField
  from ...utils import on_serialize_shape, on_deserialize_shape
  from ..core import TENSOR_TYPE, TensorOrder, TensorData, Tensor
  from ..utils import get_chunk_slices
  from ..array_utils import array_module, is_array, is_cupy
  from .core import TensorNoInput
  from .scalar import scalar
label_desc: Use image node_id 1 to create a new CSRMatrixDataSource object from inherited base classes: TensorNoInput with example: obj = CSRMatrixDataSource(data)