📅  最后修改于: 2022-03-11 14:46:04.087000             🧑  作者: Mango
import numpy
dataset = numpy.zeros(3,3)
dataset = numpy.random.randint(0,6,(3,3))
array([[5,3,2], [3,5,0], [5,2,4]])
total = dataset[:, 0].sum() + dataset[1, 1:].sum() + dataset[2,1].sum()
print(total)