On Wed, Mar 2, 2011 at 5:25 PM, Alex Ter-Sarkissov <ater1...@gmail.com> wrote: > hi, the question is probably very silly, but can't get my head around it > > Say I have an NxM numerical array. What I want is to obtain the row and > column number of the smallest value(kinda like find command in Matlab). I > use something like where(min(array_name)), but keep getting the error > message. I'd be glad if any1 could have any suggestions in this regard. >
In [1]: import numpy as np In [2]: A = np.random.randn(10,10) In [3]: np.where(A==np.min(A)) Out[3]: (array([5]), array([3])) Skipper _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion