>>> import random
>>> random.random(3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: random() takes no arguments (1 given)
>>> random.random()
0.3323491446054938
>>> random.random(3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: random() takes no arguments (1 given)
>>> import numpy as np
>>> np.random.random(3)
array([0.85786582, 0.39180011, 0.109845 ])
np.random.random(3)
最新推荐文章于 2022-11-02 15:33:40 发布