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

Support indexing 1D tensors using scalars instead of arrays #480

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

robertknight
Copy link
Owner

Make indexing 1D tensors more ergonomic by supporting tensor[index] instead of tensor[[index]] where index is a usize.

This allows indexing with `tensor[index]` instead of `tensor[[index]]`.
Simplify `tensor[[index]]` to `tensor[index]`.
@robertknight robertknight merged commit 61b4e20 into main Dec 23, 2024
2 checks passed
@robertknight robertknight deleted the index-1d-tensor-usize branch December 23, 2024 11:07
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