Re: [Numpy-discussion] ValueError: cannot convert float to NaN to integer

2009-07-25 Thread Keith Goodman
On Wed, Jul 22, 2009 at 11:51 AM, Robert Kern wrote: > On Wed, Jul 22, 2009 at 13:35, Keith Goodman wrote: >> On Ubuntu 9.04, python 2.6.2, numpy 1.2.1 this gives a ValueError: >> >> x = np.array([1,2,3]) >> x[0] = np.nan >> ValueError: cannot convert float to NaN to integer >> >> But on Debian squ

Re: [Numpy-discussion] ValueError: cannot convert float to NaN to integer

2009-07-22 Thread Robert Kern
On Wed, Jul 22, 2009 at 13:35, Keith Goodman wrote: > On Ubuntu 9.04, python 2.6.2, numpy 1.2.1 this gives a ValueError: > > x = np.array([1,2,3]) > x[0] = np.nan > ValueError: cannot convert float to NaN to integer > > But on Debian squeeze, python 2.5.4, numpy 1.2.1 the assignment works > (well,

[Numpy-discussion] ValueError: cannot convert float to NaN to integer

2009-07-22 Thread Keith Goodman
On Ubuntu 9.04, python 2.6.2, numpy 1.2.1 this gives a ValueError: x = np.array([1,2,3]) x[0] = np.nan ValueError: cannot convert float to NaN to integer But on Debian squeeze, python 2.5.4, numpy 1.2.1 the assignment works (well, the float nan is convert to the int 0): x[0] = np.nan x array(