code: def __init__(self, spvector, shape=()):
      if shape and len(shape) != 1:
          raise ValueError("Only accept 1-d array")
      if isinstance(spvector, SparseVector):
          self.spmatrix = spvector.spmatrix
      else:
          spvector = spvector.reshape(1, shape[0])
          self.spmatrix = spvector.tocsr()
  
file_path: mars/mars/lib/sparse/vector.py
imports: from .array import SparseArray, SparseNDArray
  from .core import get_array_module, get_sparse_module, naked, issparse, np, is_cupy
label_desc: Use image node_id 1 to create a new SparseVector object from inherited base classes: SparseArray with example: obj = SparseVector(spvector, shape)