numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesReturnsBackRef
geterr()

Notes

For complete documentation of the types of floating-point exceptions and treatment options, see seterr .

Returns

res : dict

A dictionary with keys "divide", "over", "under", and "invalid", whose values are from the strings "ignore", "print", "log", "warn", "raise", and "call". The keys represent possible floating-point exceptions, and the values define how these exceptions are handled.

Get the current way of handling floating-point errors.

See Also

geterrcall
seterr
seterrcall

Examples

>>> np.geterr()
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
>>> np.arange(3.) / np.arange(3.)
array([nan,  1.,  1.])
>>> oldsettings = np.seterr(all='warn', over='raise')
... np.geterr() {'divide': 'warn', 'over': 'raise', 'under': 'warn', 'invalid': 'warn'}
>>> np.arange(3.) / np.arange(3.)
array([nan,  1.,  1.])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.geterrobj numpy.errstate numpy.seterrobj numpy.seterr numpy.seterrcall scipy.special._ufuncs.geterr numpy.geterrcall

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/core/_ufunc_config.py#131
type: <class 'function'>
Commit: