[PYTHON MATRIX-SIG] max_element array method
James Hugunin
hugunin@clark.lcs.mit.edu
Sun, 31 Mar 96 12:28:16 -0500
Try argmax and argmin. (And since I had similar problems as
Konrad, the next release will add argsort).
ie.
>>> argmax([1,2,3,4,3,2,1])
(4, 3)
This will only return the index of the first maxima in the list
(which is usually what I want anyway). This will work on
arbitrarily high dimensional arrays, always acting along the last
axis.
-Jim
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================