[Numpy-discussion] isnan bug?
Eric Firing
efiring at hawaii.edu
Thu Mar 20 14:31:37 EDT 2008
Chris Withers wrote:
> Hi All,
>
> I'm faily sure that:
>
> numpy.isnan(datetime.datetime.now())
>
> ...should just return False and not raise an exception.
>
> Where can I raise a bug to this effect?
>
> cheers,
>
> Chris
>
Chris,
I don't see why you consider this a bug. isnan tests whether an
instance of a numeric type is a nan or not; if you feed it something
that is not a numeric type, it should, and does, raise an exception,
just as an exception is raised if you try to add a float to a datetime
object. In both cases, raising TypeError is entirely appropriate.
Eric
More information about the NumPy-Discussion
mailing list