[Numpy-discussion] Re: where() has started returning a tuple!?
a.h.jaffe at gmail.com
Mon Apr 17 00:53:04 CDT 2006
Aha, missed that thread (and the docstring -- my bad). And actually I
misunderstood the effect of the change, anyway: a[where(a>0)] is still
fine, it's just other activities like iterating over where(a>0) that is
no longer possible in the same way.
Thanks for the pointer!
Perry Greenfield wrote:
>> -----Original Message-----
>> From: numpy-discussion-admin at lists.sourceforge.net
>> [mailto:numpy-discussion-admin at lists.sourceforge.net]On Behalf Of Andrew
>> Sent: Sunday, April 16, 2006 6:17 PM
>> To: numpy-discussion at lists.sourceforge.net
>> Subject: [Numpy-discussion] where() has started returning a tuple!?
>> I think the following behavior is (only recently) wrong:
>> In : numpy.__version__
>> Out: '0.9.7.2360'
>> In : numpy.nonzero([True, False, True])
>> Out: array([0, 2])
>> In : numpy.where([True, False, True])
>> Out: (array([0, 2]),)
>> Note the tuple output to where(), which should be the same as nonzero.
More information about the Numpy-discussion