|
From: Alan G I. <ai...@am...> - 2005-12-06 23:33:05
|
On Tue, 6 Dec 2005, Christos Siopis apparently wrote: > As a side note, i am wondering if there is a semantic > asymmetry in using min() and max() to signify the min/max > element in the entire array while argmin() and argmax() > signify the min/max element along each axis. SciPy arrays function as "expected" in this sense: >>> import scipy >>> x=scipy.array([[1,2],[3,4]]) >>> x.max() 4 >>> x.argmax() 3 Note that, as I understand, argmax gives the index from x.flat Also, the scipy ufuncs max and argmax have the symmetry you seek, if I understand correctly. hth, Alan Isaac |