c = np.array([[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10]]) print(c.mean(axis=1))#行 print(c.mean(axis=0))#列