[Numpy-discussion] Response to PEP suggestions
Stephen Walton
stephen.walton at csun.edu
Thu Feb 17 15:34:21 CST 2005
Duncan Child wrote:
> # Note: if x is a scalar and y = asarray(x), amin(y) FAILS but min(y)
> works
> # Note: BUT IF z=convert(y,frac,frac), THEN min(z) FAILS!!
My quick check shows that amin(y), min(y), and amin(x) all work after
"from scipy import *". Only min(x) doesn't, and it is a Python built-in
which throws an "iteration over non-sequence" exception when called with
a scalar. Should Numeric 3 bump amin and similar functions up into
itself? How many others need a min-like function which works with both
arrays and scalars? In numarray, min is a method. Is this better?
More information about the Numpy-discussion
mailing list