[NumPy-Tickets] [NumPy] #1867: numpy.absolute() can return a negative value
NumPy Trac
numpy-tickets@scipy....
Tue Jun 14 14:42:09 CDT 2011
#1867: numpy.absolute() can return a negative value
--------------------------------+-------------------------------------------
Reporter: phil.hodge | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: negative, absolute |
--------------------------------+-------------------------------------------
On a 32-bit Linux machine, when the input to the np.absolute() function is
a big-endian, floating point array, the output is the same as the input,
even if the input array contains negative values. Here is an example:
{{{>>> print np.__version__
2.0.0.dev-Unknown
>>> x = np.array([-1., 0., 1.], dtype='>f8')
>>> print np.absolute(x)
[ -1.00000000e+00 0.00000000e+00 1.00000000e+00]
>>> print np.absolute(x) - x
[ 0. 0. 0.]}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1867>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list