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

iter() should iterate single element indices #21

Closed
asmeurer opened this issue May 5, 2020 · 1 comment · Fixed by #166
Closed

iter() should iterate single element indices #21

asmeurer opened this issue May 5, 2020 · 1 comment · Fixed by #166

Comments

@asmeurer
Copy link
Member

asmeurer commented May 5, 2020

For example, list(Slice(0, 3)) would return [0, 1, 2]. list(Tuple(Slice(0, 1), Slice(0, 1)) would return [(0, 0), (0, 1), (1, 0), (1, 1)]. It would raise ValueError on a Tuple with an ellipsis.

An iter would be infinite if the length of a slice is unbounded, but a shape reduced index should always give a finite iteration of exactly prod(shape) items.

@asmeurer asmeurer added this to the Low Priority milestone May 13, 2020
@asmeurer
Copy link
Member Author

This has the needs decision label because of #17.

@scopatz scopatz removed this from the Low Priority milestone Jun 10, 2020
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.

2 participants