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

mark markbak at gmail.com
Tue May 27 03:56:54 EDT 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