class_docstr: A sparse matrix (a matrix with a large number of zero elements).
  
  Examples
  ========
  
  >>> from sympy import SparseMatrix, ones
  >>> SparseMatrix(2, 2, range(4))
  Matrix([
  [0, 1],
  [2, 3]])
  >>> SparseMatrix(2, 2, {(1, 1): 2})
  Matrix([
  [0, 0],
  [0, 2]])
  
  A SparseMatrix can be instantiated from a ragged list of lists:
  
  >>> SparseMatrix([[1, 2, 3], [1, 2], [1]])
  Matrix([
  [1, 2, 3],
  [1, 2, 0],
  [1, 0, 0]])
  
  For safety, one may include the expected size and then an error
  will be raised if the indices of any element are out of range or
  (for a flat list) if the total number of elements does not match
  the expected shape:
  
  >>> SparseMatrix(2, 2, [1, 2])
  Traceback (most recent call last):
  ...
  ValueError: List length (2) != rows*columns (4)
  
  Here, an error is not raised because the list is not flat and no
  element is out of range:
  
  >>> SparseMatrix(2, 2, [[1, 2]])
  Matrix([
  [1, 2],
  [0, 0]])
  
  But adding another element to the first (and only) row will cause
  an error to be raised:
  
  >>> SparseMatrix(2, 2, [[1, 2, 3]])
  Traceback (most recent call last):
  ...
  ValueError: The location (0, 2) is out of designated range: (1, 1)
  
  To autosize the matrix, pass None for rows:
  
  >>> SparseMatrix(None, [[1, 2, 3]])
  Matrix([[1, 2, 3]])
  >>> SparseMatrix(None, {(1, 1): 1, (3, 3): 3})
  Matrix([
  [0, 0, 0, 0],
  [0, 1, 0, 0],
  [0, 0, 0, 0],
  [0, 0, 0, 3]])
  
  Values that are themselves a Matrix are automatically expanded:
  
  >>> SparseMatrix(4, 4, {(1, 1): ones(2)})
  Matrix([
  [0, 0, 0, 0],
  [0, 1, 1, 0],
  [0, 1, 1, 0],
  [0, 0, 0, 0]])
  
  A ValueError is raised if the expanding matrix tries to overwrite
  a different element already present:
  
  >>> SparseMatrix(3, 3, {(0, 0): ones(2), (1, 1): 2})
  Traceback (most recent call last):
  ...
  ValueError: collision at (1, 1)
  
  See Also
  ========
  DenseMatrix
  MutableSparseMatrix
  ImmutableSparseMatrix
class_docstr_tok: ["A","sparse","matrix","(","a","matrix","with","a","large","number","of","zero","elements",")",".","Examples","========",">",">",">","from","sympy","import","SparseMatrix",",","ones",">",">",">","SparseMatrix","(","2",",","2",",","range","(","4",")",")","Matrix","(","[","[","0",",","1","]",",","[","2",",","3","]","]",")",">",">",">","SparseMatrix","(","2",",","2",",","{","(","1",",","1",")",":","2","}",")","Matrix","(","[","[","0",",","0","]",",","[","0",",","2","]","]",")","A","SparseMatrix","can","be","instantiated","from","a","ragged","list","of","lists",":",">",">",">","SparseMatrix","(","[","[","1",",","2",",","3","]",",","[","1",",","2","]",",","[","1","]","]",")","Matrix","(","[","[","1",",","2",",","3","]",",","[","1",",","2",",","0","]",",","[","1",",","0",",","0","]","]",")","For","safety",",","one","may","include","the","expected","size","and","then","an","error","will","be","raised","if","the","indices","of","any","element","are","out","of","range","or","(","for","a","flat","list",")","if","the","total","number","of","elements","does","not","match","the","expected","shape",":",">",">",">","SparseMatrix","(","2",",","2",",","[","1",",","2","]",")","Traceback","(","most","recent","call","last",")",":","...","ValueError",":","List","length","(","2",")","!","=","rows","*","columns","(","4",")","Here",",","an","error","is","not","raised","because","the","list","is","not","flat","and","no","element","is","out","of","range",":",">",">",">","SparseMatrix","(","2",",","2",",","[","[","1",",","2","]","]",")","Matrix","(","[","[","1",",","2","]",",","[","0",",","0","]","]",")","But","adding","another","element","to","the","first","(","and","only",")","row","will","cause","an","error","to","be","raised",":",">",">",">","SparseMatrix","(","2",",","2",",","[","[","1",",","2",",","3","]","]",")","Traceback","(","most","recent","call","last",")",":","...","ValueError",":","The","location","(","0",",","2",")","is","out","of","designated","range",":","(","1",",","1",")","To","autosize","the","matrix",",","pass","None","for","rows",":",">",">",">","SparseMatrix","(","None",",","[","[","1",",","2",",","3","]","]",")","Matrix","(","[","[","1",",","2",",","3","]","]",")",">",">",">","SparseMatrix","(","None",",","{","(","1",",","1",")",":","1",",","(","3",",","3",")",":","3","}",")","Matrix","(","[","[","0",",","0",",","0",",","0","]",",","[","0",",","1",",","0",",","0","]",",","[","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","3","]","]",")","Values","that","are","themselves","a","Matrix","are","automatically","expanded",":",">",">",">","SparseMatrix","(","4",",","4",",","{","(","1",",","1",")",":","ones","(","2",")","}",")","Matrix","(","[","[","0",",","0",",","0",",","0","]",",","[","0",",","1",",","1",",","0","]",",","[","0",",","1",",","1",",","0","]",",","[","0",",","0",",","0",",","0","]","]",")","A","ValueError","is","raised","if","the","expanding","matrix","tries","to","overwrite","a","different","element","already","present",":",">",">",">","SparseMatrix","(","3",",","3",",","{","(","0",",","0",")",":","ones","(","2",")",",","(","1",",","1",")",":","2","}",")","Traceback","(","most","recent","call","last",")",":","...","ValueError",":","collision","at","(","1",",","1",")","See","Also","========","DenseMatrix","MutableSparseMatrix","ImmutableSparseMatrix"]
code: def LDLdecomposition(self, hermitian=True):
      return _LDLdecomposition_sparse(self, hermitian=hermitian)
  
imports: from collections.abc import Callable
  from sympy.core.containers import Dict
  from sympy.utilities.exceptions import sympy_deprecation_warning
  from sympy.utilities.iterables import is_sequence
  from sympy.utilities.misc import as_int
  from .matrixbase import MatrixBase
  from .repmatrix import MutableRepMatrix, RepMatrix
  from .utilities import _iszero
  from .decompositions import _liupc, _row_structure_symbolic_cholesky, _cholesky_sparse, _LDLdecomposition_sparse
  from .solvers import _lower_triangular_solve_sparse, _upper_triangular_solve_sparse
label_desc: Use image node_id 16 for calling the SparseRepMatrix obj's underlying member method code with example usage: obj.LDLdecomposition(hermitian) and returns: _LDLdecomposition_sparse