Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X.axis_name[groups] do not work anymore (regression in 0.30) #787

Closed
gdementen opened this issue Jul 17, 2019 · 1 comment
Closed

X.axis_name[groups] do not work anymore (regression in 0.30) #787

gdementen opened this issue Jul 17, 2019 · 1 comment
Assignees
Milestone

Comments

@gdementen
Copy link
Contributor

>>> arr = ndtest(10)
>>> groups = (X.a['a1':], X.a[:'a8'])
>>> X.a[groups]
AttributeError                            Traceback (most recent call last)
[...]
AttributeError: _Axis__mapping
>>> groups = (arr.a['a1':], arr.a[:'a8'])
>>> X.a[groups]
AttributeError                            Traceback (most recent call last)
[...]
AttributeError: _Axis__mapping

This works though:

>>> arr.a[groups]
 (a['a1':], a[:'a8'])
@gdementen gdementen added this to the 0.31 milestone Jul 17, 2019
@gdementen gdementen modified the milestone: 0.31 Aug 1, 2019
@gdementen gdementen self-assigned this Aug 1, 2019
@gdementen
Copy link
Contributor Author

Note that this bug only triggers when the name of the AxisReference is the same as the original group (i.e. when the operation was useless).

For example, in the above example, this worked fine:

>>> X.b[groups]
(X.b['a1':], X.b[:'a8'])

gdementen added a commit that referenced this issue Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant