[Numpy-discussion] isnan bug?
Thu Mar 20 18:11:29 CDT 2008
Eric Firing wrote:
> I don't see why you consider this a bug. isnan tests whether an
> instance of a numeric type is a nan or not;
Why does it limit to numeric types?
isnan sounds pretty boolean to me, anything that isn't nan should return
False, regardless of type, in the same way as I can do:
...and not have it blow up in my face.
I end up having to write horrific code like:
if value and (isinstance(value,(datetime,date) or not isnan(value)):
> if you feed it something
> that is not a numeric type, it should,
Why should it?
Simplistix - Content Management, Zope & Python Consulting
More information about the Numpy-discussion