docs: def mean_curve(values, weights=None):
      """
      Compute the mean by using numpy.average on the first axis.
      """
      if weights is None:
          weights = [1. / len(values)] * len(values)
      if not isinstance(values, numpy.ndarray):
          values = numpy.array(values)
      return numpy.average(values, axis=0, weights=weights)