algolib package

Subpackages

Submodules

algolib.exceptions module

Centralized exception hierarchy for algolib.

  • Keep backward compatibility with existing exceptions: - AlgolibError - InvalidTypeError - InvalidValueError

  • Add more specific exceptions grouped by area (args/dimension, algebra, geometry, numeric/convergence, feature support).

exception algolib.exceptions.AlgolibError[source]

Bases: Exception

Base exception for this library.

exception algolib.exceptions.AmbiguousGeometryError[source]

Bases: AlgolibError

Constraints are insufficient or solution is not unique.

exception algolib.exceptions.ConvergenceError(iterations: int, residual: float | None = None, target_tol: float | None = None)[source]

Bases: AlgolibError

Iteration did not converge within budget/tolerance.

iterations: int
residual: float | None = None
target_tol: float | None = None
exception algolib.exceptions.DegeneracyError[source]

Bases: AlgolibError

Degenerate configuration (e.g., zero-length direction, collinear).

exception algolib.exceptions.DimensionMismatchError(expected: Any, got: Any, message: str | None = None)[source]

Bases: AlgolibError

Incompatible shapes/dimensions.

exception algolib.exceptions.InvalidTypeError[source]

Bases: AlgolibError, TypeError

Raised when an argument has an invalid type.

exception algolib.exceptions.InvalidValueError[source]

Bases: AlgolibError, ValueError

Raised when an argument has an invalid value.

exception algolib.exceptions.LossOfSignificanceError[source]

Bases: AlgolibError

Severe cancellation/rounding made the result unreliable.

exception algolib.exceptions.NoIntersectionError[source]

Bases: AlgolibError

No intersection between geometric entities.

exception algolib.exceptions.NotImplementedAlgolibError[source]

Bases: AlgolibError, NotImplementedError

Public API declared but not implemented yet.

exception algolib.exceptions.NotPositiveDefiniteError[source]

Bases: AlgolibError

Matrix expected to be (strictly) positive-definite.

exception algolib.exceptions.NotSupportedError[source]

Bases: AlgolibError

Feature not supported in this backend/type/platform.

exception algolib.exceptions.NumericOverflowError[source]

Bases: AlgolibError, OverflowError

Numeric overflow exposed as algolib-specific error.

exception algolib.exceptions.NumericUnderflowError[source]

Bases: AlgolibError

Numeric underflow to zero/denormals that invalidates the result.

exception algolib.exceptions.SingularMatrixError[source]

Bases: AlgolibError

Matrix is singular / not invertible.

exception algolib.exceptions.ToleranceError[source]

Bases: AlgolibError, AssertionError

An expected property did not hold within tolerance.

Module contents