For comparison:

>>> float32(None)
nan
>>> float(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: float() argument must be a string or a number

On Mon, Jan 28, 2013 at 5:09 PM, Bradley M. Froehle
<[email protected]> wrote:
>>>> import numpy as np
>>>> np.double(None)
> nan
>
> On Mon, Jan 28, 2013 at 3:48 PM, Geoffrey Irving <[email protected]> wrote:
>>
>> I discovered this from C via the PyArray_FromAny function, but here it
>> is in Python:
>>
>>     >>> asarray(None,dtype=float)
>>     array(nan)
>>
>> Is this expected or documented behavior?
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> [email protected]
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to