Dot product with dyn arrays
Hi, for some reason this isn't working for me:
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().
@jturner314 Ah ok perfect, thanks!
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?