human
Numpy - Averaging multiple columns of a 2D array
assistant
Here is some code to average each two columns of array `data`

data.reshape(-1, j).mean(axis=1).reshape(data.shape[0], -1)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.