MathError

Contents

MathError#

class brainevent.MathError#

Base exception for mathematical errors in brainevent operations.

Raised when a mathematical operation fails due to invalid inputs, numerical issues, or constraint violations in sparse matrix or event-driven computations.

Parameters:

message (str) – A human-readable description of the mathematical error.

See also

KernelExecutionError

Exception for runtime kernel failures.

Notes

This is the base exception for all math-related errors in brainevent. Catch this exception to handle any mathematical failure generically.

Examples

>>> from brainevent._error import MathError
>>> raise MathError("Matrix dimensions are incompatible")
Traceback (most recent call last):
    ...
brainevent.MathError: Matrix dimensions are incompatible