Python产生随机数组,测试用

import numpy as np

if __name__ == '__main__':

a=np.random.randint(0,10,size=[3,3])

print(a)

输出:

[[6 8 3]

[1 9 1]

[8 7 6]]