[Numpy-discussion] np.min(np.inf,1000) == np.inf

joep josef.pktd at gmail.com
Tue Sep 23 16:34:20 EDT 2008


I just fell over this:

>>> np.min(np.inf,1000)
1.#INF
>>> min(np.inf,1000)
1000

>>> np.max(-np.inf,1000)
-1.#INF
>>> max(-np.inf,1000)
1000

Is this known behavior?

I finally realized, that I have to do this (the doc string says array
like)
>>> np.min([np.inf,1000])
1000.0
>>> np.max([-np.inf,1000])
1000.0

>>> np.version.version
'1.2.0rc2'
Josef



More information about the NumPy-Discussion mailing list