geterrcall()
When the error handling for a floating-point error (one of "divide", "over", "under", or "invalid") is set to 'call' or 'log', the function that is called or the log instance that is written to is returned by geterrcall
. This function or log instance has been set with seterrcall
.
For complete documentation of the types of floating-point exceptions and treatment options, see seterr
.
The current error handler. If no handler was set through seterrcall
, None
is returned.
Return the current callback function used on floating-point errors.
>>> np.geterrcall() # we did not yet set a handler, returns None
>>> oldsettings = np.seterr(all='call')
... def err_handler(type, flag):
... print("Floating point error (%s), with flag %s" % (type, flag))
... oldhandler = np.seterrcall(err_handler)
... np.array([1, 2, 3]) / 0.0 Floating point error (divide by zero), with flag 1 array([inf, inf, inf])
>>> cur_handler = np.geterrcall()See :
... cur_handler is err_handler True
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
numpy.geterr
numpy.geterrcall
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