Run
import numpy as np arr_3d = np.array([[[10, 5, 8], [4, 12, 6]], [[7, 3, 9], [2, 11, 8]]]) median = np.median(arr_3d, axis=(0, 1)) print(median)
Output