“”""
多维数组-最大最小平均值、求和
“”"
import numpy as np
n1 = np.random.randint(0,150,size=(2,4,5))
print(n1)
运行结果:
[[[144 132 99 140 19]
[122 12 37 109 24]
[143 96 71 110 80]
[ 79 107 116 90 38]]
[[ 84 146 112 117 110]
[ 99 113 7 113 66]
[120 28 103 77 76]
[ 95 66 22 139 83]]]
print(n1.max(axis=0))