[Numpy-discussion] isinf raises in inf
Thu Jul 15 18:14:21 CDT 2010
On 07/15/2010 11:45 AM, Pauli Virtanen wrote:
> Thu, 15 Jul 2010 09:54:12 -0500, John Hunter wrote:
>> In : np.isinf(x)
>> Warning: invalid value encountered in isinf Out: True
> As far as I know, isinf has always created NaNs -- since 2006 it has been
> defined on "unsupported" platforms as
> (!isnan((x))&& isnan((x)-(x)))
> I'll replace it by the obvious
> ((x) == NPY_INFINITY || (x) == -NPY_INFINITY)
> which is true only for +-inf, and cannot raise any FPU exceptions.
Is it certain that the Solaris compiler lacks isinf? Is it possible
that it has it, but it is not being detected?
More information about the NumPy-Discussion