leaspy.exceptions

Define custom Leaspy exceptions for better downstream handling.

Exceptions classes are nested so to handle in the most convenient way for users:

                Exception
                    |
                    |
              LeaspyException        RuntimeError
                    |         \            |
                    |           LeaspyConvergenceError
                   / \
     TypeError    /   \     ValueError
         |       /     \        |
  LeaspyTypeError      LeaspyInputError
                      /    |    |      \
                     /     |    |  LeaspyIndividualParamsInputError
                    /      |    |
LeaspyDataInputError       |  LeaspyAlgoInputError
                           |
                LeaspyModelInputError
For I/O operations, non-Leaspy specific errors may be raised, in particular:

Exceptions

LeaspyException

Base of all Leaspy exceptions.

LeaspyConvergenceError

Leaspy Exception for errors relative to convergence.

LeaspyTypeError

Leaspy Exception, deriving from TypeError.

LeaspyInputError

Leaspy Exception, deriving from ValueError.

LeaspyDataInputError

Leaspy Input Error for data related issues.

LeaspyModelInputError

Leaspy Input Error for model related issues.

LeaspyAlgoInputError

Leaspy Input Error for algorithm related issues.

LeaspyIndividualParamsInputError

Leaspy Input Error for individual parameters related issues.

Module Contents

exception LeaspyException[source]

Bases: Exception

Base of all Leaspy exceptions.

exception LeaspyConvergenceError[source]

Bases: LeaspyException, RuntimeError

Leaspy Exception for errors relative to convergence.

exception LeaspyTypeError[source]

Bases: LeaspyException, TypeError

Leaspy Exception, deriving from TypeError.

exception LeaspyInputError[source]

Bases: LeaspyException, ValueError

Leaspy Exception, deriving from ValueError.

exception LeaspyDataInputError[source]

Bases: LeaspyInputError

Leaspy Input Error for data related issues.

exception LeaspyModelInputError[source]

Bases: LeaspyInputError

Leaspy Input Error for model related issues.

exception LeaspyAlgoInputError[source]

Bases: LeaspyInputError

Leaspy Input Error for algorithm related issues.

exception LeaspyIndividualParamsInputError[source]

Bases: LeaspyInputError

Leaspy Input Error for individual parameters related issues.