Skip to content

indexing using X.axis[key] or 'axis[key]' syntaxes must not try other axes #876

Open
@gdementen

Description

@gdementen
>>> arr = ndtest(3)
>>> arr
a  a0  a1  a2
    0   1   2
>>> # this should NOT succeed
... arr[X.b['a1']]
1
>>> # neither should this
... arr['b[a1]']
1
>>> arr = ndtest((2, 3))
>>> # this fails as it should
>>> arr[X.b['a1']]
ValueError: X.b['a1'] is not a valid label for any axis

The above issue should not be too hard to fix because I don't see a use case we would break by restricting that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions