it does need to know N in advance, there's currently no way to parameterize the function type over different array sizes, this would need const generics
&[[f64;N];N] doesn't automatically coerce to a slice of slices [[f64]] because it has a very different representation, if you have
fn my_function(a: &[&[f64]]) {
}
then to call it, you'd need to generate an vector (or array) of slices first
fn main() {
let a: [[f64;N];N] = [[0.0;N];N];
let rows = a.iter().map(|x| &x[..]).collect::<Vec<_>>();
my_function(&rows);
}
not with regard to access, as far as i know—both an array and a vector lay out the elements consecutively in memory—the difference in performance is that a Vector requires a separate heap allocation to create, whereas arrays are allocated on the stack (or as part of the structure they're part of)