[Numpy-discussion] incorrect behavior when complex number with zero imaginary part is multiplied by inf
markbak at gmail.com
Fri Jan 28 05:49:34 EST 2011
When I multiply a complex number with inf, I get inf + inf*j:
In : inf * (1+1j)
Even when the imaginary part is really small:
In : inf * (1+1e-100j)
Yet when the imaginary part is zero (and it really is a real number), the
imaginary part is nan:
In : inf * (1+0j)
That is not correct. It should really given (inf+0*j).
(I know where it comes from, inf*0 is not defined, but in this case it is,
as 1+0j is really a real number and inf is by definition real as well).
If there is consensus I can file a ticket.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion