[Numpy-discussion] Bug in numpy.fix(): broken for scalar arguments
Darren Dale
dsdale24@gmail....
Sun Apr 18 08:08:54 CDT 2010
On Sat, Apr 17, 2010 at 4:16 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
>
> 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?
Thanks, I'm looking into it.
More information about the NumPy-Discussion
mailing list