Skip to content

Inconsistent indexing result depending on argument type #6564

Closed
@llvilanova

Description

@llvilanova

The following results seem inconsistent to me (numpy 1.9.2):

>>> a = np.arange(8).reshape((2,2,2))
>>> a[ [[0], [0]] ]
array([[0, 1]])
>>> a[ np.array([[0], [0]]) ]
array([[[[0, 1],
         [2, 3]]],
       [[[0, 1],
         [2, 3]]]])

I've briefly looked at the indexing manual (http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html) and nothing seems to account for this.

Thanks,
Lluis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions