I want to compute the integral image. for example
b = a.cumsum(axis=0)
You have to pass the argument
np.cumsum(a, axis=1, out=a)
OBS: your array is actually a 2-D array, so you can use
axis=0 to sum along the rows and
axis=1 to sum along the columns.