[Numpy-discussion] np.isfinite on structured arrays

Pauli Virtanen pav@iki...
Wed Jul 15 03:23:12 CDT 2009


Tue, 14 Jul 2009 14:45:11 -0400, Pierre GM kirjoitti:
> Consider the following code:
>  >>> a = np.array(zip(np.arange(3)),dtype=[('a',float)]) np.isfinite(a)
> NotImplemented
> 
> That is, when the input is a structured array, np.isfinite returns an
> object of type NotImplementedType. I would have expected it to raise a
> NotImplementedError exception.
> 
> Can anybody cast some light on this issue ? Thanks a lot in advance

Seems like a bug. As I understand, NotImplemented is intended to be 
returned only from __lt__ etc. comparison methods.

-- 
Pauli Virtanen



More information about the NumPy-Discussion mailing list