What information exactly is `isnan` supposed to communicate?
Put another way, given that it raises NotImplemented for unknown types,
and that bool(NotImplemented) is True, is there a reason by it cannot
return a Python bool (which seems more useful)?
Thanks,
Alan Isaac


> >> np.isnan(np.nan)
True
> >> np.isnan(np.nan) is True
False
> >> type(np.isnan(np.nan))
<type 'numpy.bool_'>
> >> np.isnan('')
NotImplemented
> >> bool(_)
True
> >> if np.isnan(''): print "Uh oh"
...
Uh oh

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to