金倩倩的美梦 发表于 2021-10-12 20:47:44

python

利用numpy的random模块创建一个10行10列的元素值为True或者False的随机数组

金倩倩的美梦 发表于 2021-10-12 21:57:12

import numpy
a=numpy.random.randint(0,2,size=,dtypo=bool)

suchocolate 发表于 2021-10-12 22:40:31

a=numpy.random.randint(0,2,size=,dtype=bool)# dtype,你写错了。

金倩倩的美梦 发表于 2021-10-13 08:30:54

suchocolate 发表于 2021-10-12 22:40
a=numpy.random.randint(0,2,size=,dtype=bool)# dtype,你写错了。

好的,谢谢{:10_250:}
页: [1]
查看完整版本: python