[Numpy-discussion] Infinity as nan as real part

Stéfan van der Walt stefan at sun.ac.za
Wed Jun 25 16:16:49 EDT 2008


2008/6/25 Robert Kern <robert.kern at gmail.com>:
> In [1]: from numpy import *
>
> In [3]: 1j == (0+1j)
> Out[3]: True
>
> In [4]: 0*inf
> Out[4]: nan

Fair enough.

How about

z = np.complex(0, np.inf)
z**2 == (nannanj)

Shouldn't that be -inf?

Regards
Stéfan



More information about the NumPy-Discussion mailing list