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

Switch to using a TryFrom trait rather than From. #683

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

LaurentMazare
Copy link
Owner

This is a second attempt at #605, this replaces the From trait converting tensors to scalar values with a TryFrom trait so that api users can handle the error rather than just getting a panic, as suggested in #602.

Because of some limitations in the Rust compiler, it's tricky to have both the From and TryFrom traits available, more details in this rustc issue, so this ends up being a breaking change.

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