Exceptions (polykin.utils.exceptions)¤
Custom exceptions and warnings used throughout PolyKin.
This module defines a consistent set of error and warning types for common failure modes in polymerization kinetics workflows, including convergence issues, fitting failures, ODE solver problems, root-finding errors, and invalid ranges or shapes. These classes are intended to improve clarity, error handling, and diagnostics across the library.
ConvergenceError ¤
Raised when an iterative algorithm fails to converge to a solution.
Source code in src/polykin/utils/exceptions.py
16 17 | |
ConvergenceWarning ¤
Raised when an iterative algorithm is approaching non-convergence, indicating potential instability or slow convergence.
Source code in src/polykin/utils/exceptions.py
20 21 22 23 24 | |
FitError ¤
Raised when a fitting procedure fails to find a valid solution.
Source code in src/polykin/utils/exceptions.py
27 28 | |
FitWarning ¤
Raised when a fitting procedure produces results that may be unreliable or near failure.
Source code in src/polykin/utils/exceptions.py
31 32 33 34 35 | |
ODESolverError ¤
Raised when an ordinary differential equation (ODE) solver fails to produce a solution.
Source code in src/polykin/utils/exceptions.py
38 39 40 41 42 | |
ODESolverWarning ¤
Raised when an ODE solver produces results that may be unreliable or indicate potential failure.
Source code in src/polykin/utils/exceptions.py
45 46 47 48 49 | |
RangeError ¤
Raised when a value lies outside the allowed or expected range.
Source code in src/polykin/utils/exceptions.py
52 53 | |
RangeWarning ¤
Raised when a value is near or slightly outside the recommended range, but not critically so.
Source code in src/polykin/utils/exceptions.py
56 57 58 59 60 | |
RootSolverError ¤
Raised when a root-finding solver fails to locate a valid root.
Source code in src/polykin/utils/exceptions.py
63 64 | |
RootSolverWarning ¤
Raised when a root-finding solver encounters potential numerical issues or uncertain results.
Source code in src/polykin/utils/exceptions.py
67 68 69 70 71 | |
ShapeError ¤
Raised when an array or tensor has an invalid or unexpected shape.
Source code in src/polykin/utils/exceptions.py
74 75 | |