[Numpy-discussion] Should we fix Ticket #709?

Zbyszek Szmek zbyszek@in.waw...
Wed Jul 2 05:21:59 CDT 2008


On Sun, Jun 29, 2008 at 09:57:52AM -0600, Charles R Harris wrote:
Hi,

> That's Ticket #709 <http://projects.scipy.org/scipy/numpy/ticket/709>:
> 
> > I'm faily sure that:
> > numpy.isnan(datetime.datetime.now()
> > ...should just return False and not raise an exception.
IMHO numpy.isnan() makes no sense for non-numerical types.

What should numpy.isnan({}) return? It is neither a valid number, nor an invalid 
one. So TypeError, as returned currently, seems best to me.

Zbyszek


More information about the Numpy-discussion mailing list