...for example:<br><br>A = np.random.rand(5,5)<br><br>In [366]: A<br>Out[366]: <br>array([[ 0.36380049,  0.26440478,  0.8515609 ,  0.07893608,  0.48084575],<br>       [ 0.71133527,  0.90912083,  0.14812865,  0.23223621,  0.49983985],<br>
       [ 0.51668793,  0.73303799,  0.18620246,  0.52968823,  0.51904697],<br>       [ 0.3988893 ,  0.60350318,  0.63808109,  0.38470785,  0.48923821],<br>       [ 0.02427049,  0.80382225,  0.42494655,  0.8986108 ,  0.39879547]])<br>
<br>In [367]: np.nonzero(A==np.min(A))<br>Out[367]: (array([4]), array([0]))<br><br><br>And this may be of interest for you:<br><a href="http://www.scipy.org/NumPy_for_Matlab_Users">http://www.scipy.org/NumPy_for_Matlab_Users</a><br>
<br>cheers<br>Marcel<br><br><br><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 11:25 PM, Alex Ter-Sarkissov <span dir="ltr"><<a href="mailto:ater1980@gmail.com">ater1980@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hi, the question is probably very silly, but can't get my head around it<br><br>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.<br>
<br>cheers,<br><font color="#888888"><br>Alex   
</font><br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br>