[Numpy-discussion] Infinity as nan as real part

Stéfan van der Walt stefan@sun.ac...
Wed Jun 25 15:16:49 CDT 2008


2008/6/25 Robert Kern <robert.kern@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