pub fn ndarray_to_vector(array: &Array1<f64>) -> Vector
Convert ndarray to Vector (optimized with pre-allocation)