>>> 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)
最新推荐文章于 2024-05-02 15:46:55 发布