Function calculate_column_stat

Source
pub fn calculate_column_stat<T, F>(data: &Vec<Vec<T>>, func: F) -> Vec<T>
where T: Float + NumAssign + Copy, F: Fn(&[T]) -> T,
Expand description

Calculate the provided statistic over the columns of the given matrix representation, respecting nans

**Note:** We don't want an external dependency for this allone, but might switch to ndarray in the future.

ยงArguments:

  • data: input data in form of a 2d matrix
  • func: statistics to apply, e.g. mean or median