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

Perry Greenfield perry at stsci.edu
Thu May 13 12:43:01 CDT 2004

> Russell E Owen wrote:
> 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 
> times).
> 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
We will definitely add something like this for 1.0 or 1.1.
(but probably for min and max location, it will just be
for the first encountered).


More information about the Numpy-discussion mailing list