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

Consider using ndindex for canonicalizing indexes #403

Closed
tomwhite opened this issue Feb 29, 2024 · 0 comments · Fixed by #481
Closed

Consider using ndindex for canonicalizing indexes #403

tomwhite opened this issue Feb 29, 2024 · 0 comments · Fixed by #481

Comments

@tomwhite
Copy link
Member

The logic in index for manipulating an index selection is fairly complicated, particularly the part that removes any ellipsis. (See #400, #401, #402.)

We could use ndindex to help with this - the following shows how easy it is to remove an ellipsis:

idx = ndindex.ndindex(key)
key = idx.expand(x.shape).raw

The library is well tested with Hypothesis tests, but it would be another (pure Python) dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant