[Numpy-tickets] [NumPy] #501: "print arr" fails with nan when seterr(all='raise') [test included]
NumPy
numpy-tickets@scipy....
Mon May 21 04:21:06 CDT 2007
#501: "print arr" fails with nan when seterr(all='raise') [test included]
-------------------------+--------------------------------------------------
Reporter: AndrewStraw | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.0.3 Release
Component: numpy.core | Version: none
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by stefan):
Andrew: This is the code called during printing that behaves differently
on 32 and 64-bit platforms:
32-bit:
{{{
In [4]: umath.maximum.reduce(x)
Out[4]: nan
}}}
64-bit:
{{{
In [4]: umath.maximum.reduce(x)
Warning: invalid value encountered in reduce
Out[4]: nan
}}}
When using ```seterr(all='raise')```, this warning causes the problem you
see. I'd say the warning by umath was *not* expected by the author of the
code.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/501#comment:8>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list