[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]: '0.9.7.2360'

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.

Andrew





More information about the Numpy-discussion mailing list