[Numpy-discussion] Are "min", "max" documented for scalars?

Edward C. Jones edcjones@comcast....
Wed Jun 6 21:17:32 CDT 2012


Python "max" and "min" have an interesting and _useful_ behavior when
applied to numpy scalars and Python numbers.  Here is a piece of
pseudo-code:

def max(a, b):
     if int(b) > int(a):
         return b
     else:
         return a

The larger object is returned unchanged.  If the two objects are equal,
return the first unchanged.

Is the behavior of "max", "min", "<", "<=", etc. for numpy scalar objects
documented somewhere?

keywords: greater than less than



More information about the NumPy-Discussion mailing list