python中random模塊的randint與numpy.random模塊的randint
轉自:http://blog.csdn.net/ztf312/article/details/77871424
這簡直就是python一個大坑
random.randint(a, b) # 返回閉區間 [a, b] 範圍內的整數值
numpy.random.randint(a, b) # 返回開區間 [a, b) 範圍內的整數值
random.random()是生成0-1的隨機浮點數
python中random模塊的randint與numpy.random模塊的randint
轉自:http://blog.csdn.net/ztf312/article/details/77871424
這簡直就是python一個大坑
random.randint(a, b) # 返回閉區間 [a, b] 範圍內的整數值
numpy.random.randint(a, b) # 返回開區間 [a, b) 範圍內的整數值
random.random()是生成0-1的隨機浮點數
讓您你們失望了,我啥都沒寫。 提供鏈接 https://blog.csdn.net/weixin_30832351/article/details/94889557