On 6/21/06, <b class="gmail_sendername">Simon Burton</b> <<a href="mailto:simon@arrowtheory.com">simon@arrowtheory.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 21 Jun 2006 13:48:48 +0900<br>"Bill Baxter" <<a href="mailto:wbaxter@gmail.com">wbaxter@gmail.com</a>> wrote:<br><br>><br>> >>> a[:,num.where(v>0.5)[0]]<br>> array([[1, 2, 4],<br>
>        [6, 7, 9]])<br>><br>> I'll put that up on the Matlab->Numpy page.<br><br>oh, yuck. What about this:<br><br>>>> a[:,num.nonzero(v>0.5)]<br>array([[0, 1, 3],<br>       [5, 6, 8]])<br>>>>
</blockquote><div><br>The nonzero() function seems like kind of an anomaly in and of itself.    It doesn't behave like other index-returning numpy functions, or even like the method version, v.nonzero(), which returns the typical tuple of array.  So my feeling is ... ew to 
numpy.nonzero.<br><br>--Bill<br></div><br></div>