Exceptions#

Exception hierarchy for comnumpy (decision D38).

Three members, no more. The double inheritance preserves existing except ValueError / except RuntimeError user code.

Error messages follow the normative template: observed, expected, action (“got X, expected Y, do Z”).

exception ComnumpyError[source]#

Base class for every comnumpy-raised error.

except ComnumpyError separates “my chain is misconfigured” from an underlying numpy/scipy bug, a distinction a bare ValueError cannot make.

exception ShapeError[source]#

Raised by prepare() when the input does not match the block’s declared axes.

The message states the observed shape, the expected shape, and the action to fix it, e.g.:

ShapeError: expected shape (..., ant, N), got (N,) -- add an antenna
axis or use a SISO block.
exception NotFittedError[source]#

Raised when forward() needs an estimated quantity but fit() was never called.