-
Notifications
You must be signed in to change notification settings - Fork 348
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 TryFrom<Tensor>
for primitive numeric types to avoid panic
#602
Comments
Just to be sure, do you actually mean |
Ah I'm sorry, you're right, I mean |
TryFrom<Tensor>
for primitive numeric types to avoid panic
I've started looking into this but because of specialization not being handled properly, it's tricky to have both the |
The change has been merged so closing this for now, feel free to re-open if further issues. |
Tensor
currently implementsFrom<i32>
,From<i64>
,From<f32>
Tensor
currently implementsFrom<Tensor> for
:i32
,i64
,f32
, ... for some common rust types, and panics if theres more than one item in the Tensor.TryFrom
trait for these types are not implemented, but would be very handy in cases where you care about handling the error.The text was updated successfully, but these errors were encountered: