I find myself often wanting both the max and the argmax of an array. (And same for the other arg* functions) Of course I can do argmax first then use fancy indexing to get the max as well. But the result of argmax isn't really in a format that's readily usable as an index. You have to do something like a = rand(10,5) imax = a.argmax(axis=0) vmax = a[(imax, range(5))]
Which isn't terrible, just always takes me a moment to remember the proper indexing expression. Would a way to get the argmax and the max at the same time be of interest to anyone else? Maybe an extra 'ret' arg on argmax? a = rand(10,5) imax,vmax = a.argmax(axis=0,retmax=True) --Bill ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion