Is a Numpy way to make a sum each three elements in the interval with a step? For example:
import numpy as np
mydata = np.array([4, 2, 3, 8, -6, 10])
I would like to get this result:
np.array([9, 12])
I suppose that np.convole can do this, according to Summing elements in a sliding window - NumPy, but can I change the step from n=1 to n=3, in this case?