You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let a = array![[1.]].into_dyn();let b = array![[1.]].into_dyn();let c = a.dot(&b);
I'm getting this error:
no method named `dot` found for struct `ArrayBase<OwnedRepr<{float}>, Dim<IxDynImpl>>` in the current scope
method not found in `ArrayBase<OwnedRepr<{float}>, Dim<IxDynImpl>>`
Am I doing something wrong or is this a bug? Version 0.14.0
The dot product isn't implemented for dynamic-dimensional arrays right now, although I wouldn't be opposed to adding these implementations. For the time being, you can work around this by converting dynamic-dimensional arrays into const-dimensional arrays with .into_dimensionality() before calling .dot().
The dot product isn't implemented for dynamic-dimensional arrays right now, although I wouldn't be opposed to adding these implementations. For the time being, you can work around this by converting dynamic-dimensional arrays into const-dimensional arrays with .into_dimensionality() before calling .dot().
And how do I change the result dimensions back to the previous ones after that?
Activity
jturner314 commentedon Jan 8, 2021
The dot product isn't implemented for dynamic-dimensional arrays right now, although I wouldn't be opposed to adding these implementations. For the time being, you can work around this by converting dynamic-dimensional arrays into const-dimensional arrays with
.into_dimensionality()before calling.dot().FredrikNoren commentedon Jan 8, 2021
@jturner314 Ah ok perfect, thanks!
georgikolev17 commentedon Apr 20, 2023
And how do I change the result dimensions back to the previous ones after that?
akern40 commentedon Mar 18, 2025
Closed by #1483