Source code for hottbox.errors

"""
This module includes all custom warnings and errors used across ``hottbox``.
"""

__all__ = [
    "TensorStateError",
    "TensorModeError",
    "TensorShapeError",
    "TensorTopologyError",
    "StateError",
    "ModeError",
]


[docs]class TensorStateError(Exception): """ Error raised when attempting to perform an operation on a ``Tensor`` which is not allowed for its current state """ pass
[docs]class TensorModeError(Exception): """ Error raised when attempting to perform an operation on a ``Tensor`` which is not allowed by its ``Mode`` """ pass
[docs]class TensorShapeError(Exception): """ Error raised when attempting to perform an operation on a ``Tensor`` which is not allowed for its current shape """ pass
[docs]class TensorTopologyError(Exception): """ Error related to the dimensionality mismatch of counterparts of ``TensorCPD``, ``TensorTKD`` and ``TensorTT`` """ pass
[docs]class StateError(Exception): """ Error raised when there is an attempt to set incorrect parameters for state of a ``Tensor`` """ pass
[docs]class ModeError(Exception): """ Error raised when there is an attempt to set incorrect parameters for mode of a ``Tensor`` """ pass