Warnings#

class caskade.CaskadeWarning[source]#

Bases: Warning

Base warning class for caskade.

All custom warnings issued by caskade inherit from this class, allowing users to filter or catch any caskade-specific warning.

class caskade.InvalidValueWarning(name, value, valid)[source]#

Bases: CaskadeWarning

Warning issued when a parameter value is outside its valid range.

Indicates that the assigned value may cause errors or unexpected behavior during computation.

Parameters:
  • name (str) – Name of the parameter with the out-of-range value.

  • value (ArrayLike) – The value that was assigned.

  • valid (tuple) – A (lower, upper) tuple defining the valid range, where None represents negative or positive infinity.

class caskade.SaveStateWarning[source]#

Bases: CaskadeWarning

Warning issued when saving state encounters a non-fatal problem.

Issued when the state serialization completes but with potential data loss or format issues that the user should be aware of.