You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
503 B
27 lines
503 B
"""
|
|
Exceptions raised by the matrix module.
|
|
"""
|
|
|
|
|
|
class MatrixError(Exception):
|
|
pass
|
|
|
|
|
|
class ShapeError(ValueError, MatrixError):
|
|
"""Wrong matrix shape"""
|
|
pass
|
|
|
|
|
|
class NonSquareMatrixError(ShapeError):
|
|
pass
|
|
|
|
|
|
class NonInvertibleMatrixError(ValueError, MatrixError):
|
|
"""The matrix in not invertible (division by multidimensional zero error)."""
|
|
pass
|
|
|
|
|
|
class NonPositiveDefiniteMatrixError(ValueError, MatrixError):
|
|
"""The matrix is not a positive-definite matrix."""
|
|
pass
|