class_docstr: Create an immutable version of a sparse matrix.
  
  Examples
  ========
  
  >>> from sympy import eye, ImmutableSparseMatrix
  >>> ImmutableSparseMatrix(1, 1, {})
  Matrix([[0]])
  >>> ImmutableSparseMatrix(eye(3))
  Matrix([
  [1, 0, 0],
  [0, 1, 0],
  [0, 0, 1]])
  >>> _[0, 0] = 42
  Traceback (most recent call last):
  ...
  TypeError: Cannot set values of ImmutableSparseMatrix
  >>> _.shape
  (3, 3)
class_docstr_tok: ["Create","an","immutable","version","of","a","sparse","matrix",".","Examples","========",">",">",">","from","sympy","import","eye",",","ImmutableSparseMatrix",">",">",">","ImmutableSparseMatrix","(","1",",","1",",","{","}",")","Matrix","(","[","[","0","]","]",")",">",">",">","ImmutableSparseMatrix","(","eye","(","3",")",")","Matrix","(","[","[","1",",","0",",","0","]",",","[","0",",","1",",","0","]",",","[","0",",","0",",","1","]","]",")",">",">",">","_","[","0",",","0","]","=","42","Traceback","(","most","recent","call","last",")",":","...","TypeError",":","Can","not","set","values","of","ImmutableSparseMatrix",">",">",">","_.shape","(","3",",","3",")"]
code: def _fromrep(cls, rep):
      rows, cols = rep.shape
      smat = rep.to_sympy().to_dok()
      obj = Basic.__new__(cls, Integer(rows), Integer(cols), Dict(smat))
      obj._rows = rows
      obj._cols = cols
      obj._rep = rep
      return obj
  
imports: from mpmath.matrices.matrices import _matrix
  from sympy.core import Basic, Dict, Tuple
  from sympy.core.numbers import Integer
  from sympy.core.cache import cacheit
  from sympy.core.sympify import _sympy_converter, _sympify
  from sympy.matrices.dense import DenseMatrix
  from sympy.matrices.expressions import MatrixExpr
  from sympy.matrices.matrixbase import MatrixBase
  from sympy.matrices.repmatrix import RepMatrix
  from sympy.matrices.sparse import SparseRepMatrix
  from sympy.multipledispatch import dispatch
label_desc: Use image node_id 2 for calling the ImmutableSparseMatrix obj's underlying member method code with example usage: obj._fromrep(cls, rep) and returns: obj