code: def pairwise_mean(values):
      "Averages between a value and the next value in a sequence"
      return numpy.array([numpy.mean(pair) for pair in pairwise(values)]f pairwise_mean(values):
      "Averages between a value and the next value in a sequence"
      return numpy.array([numpy.mean(pair) for pair in pairwise(values)])
docs: Averages between a value and the next value in a sequence