[Numpy-discussion] isnan bug?
Chris Withers
chris at simplistix.co.uk
Thu Mar 20 19:11:29 EDT 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:
isinstance(*anything*,SomeClass)
...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?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the NumPy-Discussion
mailing list