[Numpy-discussion] where() has started returning a tuple!?

Andrew Jaffe a.h.jaffe at gmail.com
Sun Apr 16 15:18:02 CDT 2006

I think the following behavior is (only recently) wrong:

In [7]: numpy.__version__
Out[7]: ''

In [8]: numpy.nonzero([True, False, True])
Out[8]: array([0, 2])

In [9]: numpy.where([True, False, True])
Out[9]: (array([0, 2]),)

Note the tuple output to where(), which should be the same as nonzero.


More information about the Numpy-discussion mailing list