Errors¶
This is an overview about the exceptions that could arise in this package. They are available in matrix.errors:
If a matrix should be decomposed with matrix.decompose and the desired decomposition is not computable, the following exceptions can be raised:
NoDecompositionPossibleError¶
-
class
matrix.errors.
NoDecompositionPossibleError
(base, desired_type)[source]¶ Bases:
matrix.errors.BaseError
It is not possible to calculate a desired matrix decomposition.
NoDecompositionPossibleWithProblematicSubdecompositionError¶
-
class
matrix.errors.
NoDecompositionPossibleWithProblematicSubdecompositionError
(base, desired_type, problematic_leading_principal_submatrix_index, subdecomposition=None)[source]¶ Bases:
matrix.errors.NoDecompositionPossibleError
It is not possible to calculate a desired matrix decomposition. Only a subdecompostion could be calculated
NoDecompositionPossibleTooManyEntriesError¶
-
class
matrix.errors.
NoDecompositionPossibleTooManyEntriesError
(matrix, desired_type)[source]¶ Bases:
matrix.errors.NoDecompositionPossibleError
The decomposition is not possible for this matrix because it would have too many entries.
NoDecompositionConversionImplementedError¶
-
class
matrix.errors.
NoDecompositionConversionImplementedError
(decomposition, desired_type)[source]¶ Bases:
matrix.errors.NoDecompositionPossibleError
A decomposition conversion is not implemented for this type.
If a matrix has an invalid characteristic, the following exceptions can occur:
MatrixError¶
-
class
matrix.errors.
MatrixError
(matrix, message=None)[source]¶ Bases:
matrix.errors.BaseError
An exception related to a matrix.
MatrixNotSquareError¶
-
class
matrix.errors.
MatrixNotSquareError
(matrix)[source]¶ Bases:
matrix.errors.MatrixError
A matrix is not a square matrix although a square matrix is required.
MatrixNotFiniteError¶
-
class
matrix.errors.
MatrixNotFiniteError
(matrix)[source]¶ Bases:
matrix.errors.MatrixError
A matrix has non-finite entries although a finite matrix is required.
MatrixSingularError¶
-
class
matrix.errors.
MatrixSingularError
(matrix)[source]¶ Bases:
matrix.errors.MatrixError
A matrix is singular although an invertible matrix is required.
MatrixNotHermitianError¶
-
class
matrix.errors.
MatrixNotHermitianError
(matrix, i=None, j=None)[source]¶ Bases:
matrix.errors.MatrixError
A matrix is not Hermitian although a Hermitian matrix is required.
MatrixComplexDiagonalValueError¶
-
class
matrix.errors.
MatrixComplexDiagonalValueError
(matrix, i=None)[source]¶ Bases:
matrix.errors.MatrixNotHermitianError
A matrix has complex diagonal values although real diagonal values are required.
If the matrix represented by a decomposition has an invalid characteristic, the following exceptions can occur:
DecompositionError¶
-
class
matrix.errors.
DecompositionError
(decomposition, message=None)[source]¶ Bases:
matrix.errors.BaseError
An exception related to a decomposition.
DecompositionNotFiniteError¶
-
class
matrix.errors.
DecompositionNotFiniteError
(decomposition)[source]¶ Bases:
matrix.errors.DecompositionError
A decomposition of a matrix has non-finite entries although a finite matrix is required.
DecompositionSingularError¶
-
class
matrix.errors.
DecompositionSingularError
(decomposition)[source]¶ Bases:
matrix.errors.DecompositionError
A decomposition represents a singular matrix although a non-singular matrix is required.
If a decomposition should be loaded from a file which is not a valid decomposition file, the following exception is raised:
DecompositionInvalidFile¶
-
class
matrix.errors.
DecompositionInvalidFile
(filename)[source]¶ Bases:
matrix.errors.DecompositionError
,OSError
An attempt was made to load a decomposition from an invalid file.
If a decomposition should be loaded from a file which caontains a type which does not fit to the type of the decomposition where it should be loaded into, the following exception is raised:
DecompositionInvalidDecompositionTypeFile¶
-
class
matrix.errors.
DecompositionInvalidDecompositionTypeFile
(filename, type_file, type_needed)[source]¶ Bases:
matrix.errors.DecompositionInvalidFile
An attempt was made to load a decomposition from an file in which another decomposition type is stored.
The following exception is the base exception from which all other exceptions in this package are derived: