Just use numpy.sum() : result = np.sum(matrix). or equivalently, the .sum() method of the array: result = matrix.sum().
確定! 回上一頁