ndarray icon indicating copy to clipboard operation
ndarray copied to clipboard

`NdArray` trait

Open bluss opened this issue 8 years ago • 5 comments
trafficstars

We need to traitify the array types, so that we shift from using ArrayBase for generic programming to something more flexible.

Imagine a sketch:

pub fn std_axis<T>(array: T) -> Array<T::Elem, T::Dim::Smaller>
    where T: NdArray,
          T::Elem: Num,
{
     // implementation here.
}

Foreseen problems: How do we conditionalize methods?

  • Can mutate the axes or view
  • Can mutate elements
  • etc

bluss avatar Aug 13 '17 16:08 bluss