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

Implement core::ops::Index and core::ops::IndexMut #97

Open
Tracked by #93
minghuaw opened this issue Jul 24, 2024 · 0 comments
Open
Tracked by #93

Implement core::ops::Index and core::ops::IndexMut #97

minghuaw opened this issue Jul 24, 2024 · 0 comments

Comments

@minghuaw
Copy link
Collaborator

minghuaw commented Jul 24, 2024

With a little bit of unsafe code, returning a reference to a contiguous or single element within the Array should be safe-ish. The tensorflow binding does this to a limited types of indices (see here: https://github.com/tensorflow/rust/blob/454da033e4eb5ac3fff96c7bed9734c49d7e3bd3/src/buffer.rs#L224)

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

No branches or pull requests

1 participant