使用numpy的max函数,该函数也是适用于其他维度的数组。 例子如下: >>> a = np.arange(4).reshape((2,2)) >>> a array([[0, 1], [2, 3]]) >>> np.amax(a) # 整个数组 ...
確定! 回上一頁