Averages of slices on a 1d nparray: how to make it more NumPy-thonic?,np.cumsum(a[::-1])[::-1] - np.cumsum(a)