[Numpy-discussion] None as missing value

Pierre GM pgmdevlist at mailcan.com
Mon Jul 3 11:40:04 CDT 2006


> I was also a bit surprised at the following behavior:
>>> a = numpy.asarray([1,1])
>>> a
array([1, 1])
>>> a[0]=numpy.nan
>>> a
array([0, 1])

Seems to affect only the int_ arrays:

>>> a = numpy.asarray([1,1], dtype=float_)
>>> a
array([1., 1.])
>>> a[0]=numpy.nan
>>> a
array([        nan,  1.        ])






More information about the Numpy-discussion mailing list