[Numpy-discussion] Getting the indexes of the myarray.min()

Russell E Owen rowen at u.washington.edu
Thu May 13 12:23:04 CDT 2004

At 9:27 AM -0400 2004-05-13, Perry Greenfield wrote:
>... One has to trade off the number of such functions
>against the speed savings. Another example is getting max and min values
>for an array. I've long thought that this is so often done they could
>be done in one pass. There isn't a function that does this yet though.

Statistics is another area where multiple return values could be of 
interest -- one may want the mean and std dev, and making two passes 
is wasteful (since some of the same info needs to be computed both 

A do-all function that computes min, min location, max, max location, 
mean and std dev all at once would be nice (especially if the 
returned values were accessed by name, rather than just being a tuple 
of values, so they could be referenced safely and readably).

-- Russell

More information about the Numpy-discussion mailing list