Run
import numpy as np #initialize array A = np.array([[[2, 1], [5, 4]], [[3, 9], [6, 8]]]) #compute mean output = np.mean(A, axis=(0, 1)) print(output)
Output