auto_uncertainties.exceptions

Exceptions

NegativeStdDevError

An exception for when the standard deviation is negative.

DowncastError

An exception for when an array of Uncertainty

DowncastWarning

A warning for when an array of Uncertainty

EqualityWarning

A warning that is raised when the equality check is performed on two

EqualityError

An exception that is raised when the equality check is performed on two

Functions

set_equality_error(val)

Set whether EqualityError should be raised instead of a warning when performing

set_downcast_error(val)

Set whether DowncastError should be raised when uncertainty is stripped.

set_compare_rtol(val)

Set the comparison relative tolerance for error when performing equality

Module Contents

exception auto_uncertainties.exceptions.NegativeStdDevError[source]

Bases: Exception

Inheritance diagram of auto_uncertainties.exceptions.NegativeStdDevError

An exception for when the standard deviation is negative.

exception auto_uncertainties.exceptions.DowncastError[source]

Bases: RuntimeError

Inheritance diagram of auto_uncertainties.exceptions.DowncastError

An exception for when an array of Uncertainty objects is downcast to a NumPy ndarray.

exception auto_uncertainties.exceptions.DowncastWarning[source]

Bases: RuntimeWarning

Inheritance diagram of auto_uncertainties.exceptions.DowncastWarning

A warning for when an array of Uncertainty objects is downcast to a NumPy ndarray.

exception auto_uncertainties.exceptions.EqualityWarning[source]

Bases: RuntimeWarning

Inheritance diagram of auto_uncertainties.exceptions.EqualityWarning

A warning that is raised when the equality check is performed on two Uncertainty objects with identical central values, but different standard deviations.

exception auto_uncertainties.exceptions.EqualityError[source]

Bases: RuntimeError

Inheritance diagram of auto_uncertainties.exceptions.EqualityError

An exception that is raised when the equality check is performed on two Uncertainty objects with identical central values, but different standard deviations.

auto_uncertainties.exceptions.set_equality_error(val)[source]

Set whether EqualityError should be raised instead of a warning when performing an equality check between two Uncertainty objects with identical central values, but different standard deviations.

Parameters:

val (bool)

Return type:

None

auto_uncertainties.exceptions.set_downcast_error(val)[source]

Set whether DowncastError should be raised when uncertainty is stripped.

Parameters:

val (bool)

Return type:

None

auto_uncertainties.exceptions.set_compare_rtol(val)[source]

Set the comparison relative tolerance for error when performing equality operations on Uncertainty objects.

Parameters:

val (float)

Return type:

None