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

Allow constructing indices with ndindex[idx] #168

Merged
merged 12 commits into from
Feb 7, 2024

Conversation

asmeurer
Copy link
Member

No description provided.

I think the call syntax is just fine if you are converting a variable. It's a
little clearer it's a constructor. The getitem syntax is really only
preferable when it reduces typing for tuple and slice literals.
I've primarily only done this in places where the index is a literal
(particularly a slice or tuple literal, which is the only place where it
matters). In other places, especially in the code, a generic ndindex(idx) is
clearer as a constructor than ndindex[idx], so I've left it alone.
@asmeurer asmeurer merged commit e5629f5 into Quansight-Labs:main Feb 7, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant