simple_stats (pyleoclim.utils.tsutils.simple_stats)

pyleoclim.utils.tsutils.simple_stats(y, axis=None)[source]

Computes simple statistics

Computes the mean, median, min, max, standard deviation, and interquartile range of a numpy array y, ignoring NaNs.

Parameters
  • y (array) – A Numpy array

  • axis (int, tuple of ints) – Optional. Axis or Axes along which the means are computed, the default is to compute the mean of the flattened array. If a tuple of ints, performed over multiple axes

Returns

  • mean (float) – mean of y, ignoring NaNs

  • median (float) – median of y, ignoring NaNs

  • min_ (float) – mininum value in y, ignoring NaNs

  • max_ (float) – max value in y, ignoring NaNs

  • std (float) – standard deviation of y, ignoring NaNs

  • IQR (float) – Interquartile range of y along specified axis, ignoring NaNs