[Numpy-discussion] handling of inf
Kilian Koepsell
python@koepsell...
Fri Jun 22 03:19:07 CDT 2007
Hi,
I was wondering if the numpy function 'isinf' should return True for
complex infinity.
I encountered the following behavior that could be considered a bug:
>>> import numpy as N
>>> N.isinf(1j*N.inf)
True
>>> 1j/(N.array(1)-1)
(nannanj)
>>> N.isinf(1j/(N.array(1)-1))
False
>>> 1j/(N.array([1])-1)
array([ nan +nanj])
>>> N.isinf(1j/(N.array([1])-1))
array([False], dtype=bool)
Thanks,
Kilian
--
Kilian Koepsell
Redwood Center for Theoretical Neuroscience
Helen Wills Neuroscience Institute, UC Berkeley
132 Barker Hall, #3190, Berkeley, CA 94720-3190
More information about the Numpy-discussion
mailing list