Skip to main content

array_viewd_to_mat_ref_or_transposed

Function array_viewd_to_mat_ref_or_transposed 

Source
pub fn array_viewd_to_mat_ref_or_transposed<'a, T: Field>(
    arr: &'a ArrayViewD<'a, T>,
) -> Option<(MatRef<'a, T>, bool)>
Expand description

Creates a MatRef view from an ndarray ArrayViewD, handling row-major layout.

ยงReturns

  • Some((MatRef, false)) if the array is 2D and column-major
  • Some((MatRef, true)) if the array is 2D and row-major (MatRef is transposed)
  • None if the array is not 2D or layout is incompatible