I don't personally know, but browsing docs, ArrayBase::shape says
Note that you probably don’t want to use this to create an array of the same shape as another array because creating an array with e.g. Array::zeros() using a shape of type &[usize] results in a dynamic-dimensional array. If you want to create an array that has the same shape and dimensionality as another array, use .raw_dim() instead:
// To get the same dimension type, use `.raw_dim()` instead:
let c = Array::zeros(a.raw_dim());