Skip to content

Commit

Permalink
Merge pull request numpy#5436 from aisthesis/seterrcall-doc
Browse files Browse the repository at this point in the history
DOC: Fix doc of seterrcall. Issue numpy#4427
  • Loading branch information
charris committed Jan 11, 2015
2 parents aaf5429 + f304b48 commit 926b236
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions numpy/core/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -2675,12 +2675,13 @@ def seterrcall(func):
Function to call upon floating-point errors ('call'-mode) or
object whose 'write' method is used to log such message ('log'-mode).
The call function takes two arguments. The first is the
type of error (one of "divide", "over", "under", or "invalid"),
and the second is the status flag. The flag is a byte, whose
least-significant bits indicate the status::
The call function takes two arguments. The first is a string describing the
type of error (such as "divide by zero", "overflow", "underflow", or "invalid value"),
and the second is the status flag. The flag is a byte, whose four
least-significant bits indicate the type of error, one of "divide", "over",
"under", "invalid"::
[0 0 0 0 invalid over under invalid]
[0 0 0 0 divide over under invalid]
In other words, ``flags = divide + 2*over + 4*under + 8*invalid``.
Expand Down

0 comments on commit 926b236

Please sign in to comment.