[Numpy-discussion] Why does argwhere return column vector?

mark markbak@gmail....
Tue May 27 02:56:54 CDT 2008


Hello list.

I don't understand why argwhere returns a column vector when I apply
it to a row vector:

>>> a = arange(5)
>>> argwhere(a>1)
array([[2],
       [3],
       [4]])

That seems odd and inconvenient. Any advantage that I am missing?

Mark


More information about the Numpy-discussion mailing list