[Numpy-discussion] numpy.ma.arg{min,max}

Adam Oliner oliner@stanford....
Fri Apr 10 16:09:00 CDT 2009


Hi there,

The documentation for numpy.ma.argmin says:
"Returns array of indices of the maximum values along the given axis."

Aside from probably meaning to say the 'minimum' values, it also  
doesn't seem to return an array:

 >>> a
array([1, 1, 1, 5, 5])
 >>> numpy.ma.argmax(a)
3
 >>> numpy.ma.argmin(a)
0

I was expecting to get more than one index for both calls. Am I doing  
something wrong or misreading the documentation?

  - Adam J. Oliner
    oliner@cs.stanford.edu





More information about the Numpy-discussion mailing list