<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 4:27 AM, Mark Bakker <span dir="ltr"><<a href="mailto:markbak@gmail.com" target="_blank">markbak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Gregorio.<div>I would like it if argmax had a keyword option to return the row,column index automatically (or whatever the dimension of the array). </div>
<div>Afterall, argmax already knows the shape of the array.</div>
<div>Calling np.unravel_index( np.argmax( A ) ) seems unnecessarily long. But it works well though!<br></div><div><div>I am not sure that such a PR would get much support....</div></div><div>Thanks again,</div><div>Mark</div>
<div><br></div></div></blockquote><div><br></div><div>What should it do when np.argmax() gets "axis=1" argument? I see confusion occurring with parsing the returned results for arbitrary dimension inputs. -1 on any such PR. +1 on making sure all arg*() functions have unravel_index() very prominent in their documentation (which it does right now for argmax()).<br>
<br>Ben Root<br></div></div></div></div>