scipy.special.

geterr#

scipy.special.geterr()#

Get the current way of handling special-function errors.

Returns:
errdict

A dictionary with keys β€œsingular”, β€œunderflow”, β€œoverflow”, β€œslow”, β€œloss”, β€œno_result”, β€œdomain”, β€œarg”, and β€œother”, whose values are from the strings β€œignore”, β€œwarn”, and β€œraise”. The keys represent possible special-function errors, and the values define how these errors are handled.

See also

seterr

set how special-function errors are handled

errstate

context manager for special-function error handling

numpy.geterr

similar numpy function for floating-point errors

Notes

For complete documentation of the types of special-function errors and treatment options, see seterr.

Examples

By default all errors are ignored.

>>> import scipy.special as sc
>>> for key, value in sorted(sc.geterr().items()):
...     print(f'{key}: {value}')
...
arg: ignore
domain: ignore
loss: ignore
memory: raise
no_result: ignore
other: ignore
overflow: ignore
singular: ignore
slow: ignore
underflow: ignore