pub fn arrayd_to_array2<T: Clone>(arr: &ArrayD<T>) -> Array2<T>
Converts an ArrayD to an Array2.
Panics if the array is not 2-dimensional.