[Numpy-discussion] Bug in numpy.fix(): broken for scalar arguments

Charles R Harris charlesr.harris@gmail....
Sat Apr 17 15:16:50 CDT 2010


On Sat, Apr 17, 2010 at 2:01 PM, Eric Firing <efiring@hawaii.edu> wrote:

> np.fix() no longer works for scalar arguments:
>
>
> In [1]:import numpy as np
>
> In [2]:np.version.version
> Out[2]:'2.0.0.dev8334'
>
> In [3]:np.fix(3.14)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
>
> /home/efiring/<ipython console> in <module>()
>
> /usr/local/lib/python2.6/dist-packages/numpy/lib/ufunclike.pyc in fix(x, y)
>      46     if y is None:
>      47         y = y1
> ---> 48     y[...] = nx.where(x >= 0, y1, y2)
>      49     return y
>      50
>
> TypeError: 'numpy.float64' object does not support item assignment
>
>
>
Looks like r8293. Darren?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100417/861f82e1/attachment.html 


More information about the NumPy-Discussion mailing list