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

joep josef.pktd@gmail....
Tue Sep 23 15:34:20 CDT 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