ImportError:无法导入名称random_integers

Mat*_*ott 3 python numpy importerror

我有一个包含该行的前导码的Python代码:

from numpy import array,arccosh,random_integers
Run Code Online (Sandbox Code Playgroud)

稍后在代码中我(成功)使用arrayarccosh.但是,我在程序运行时遇到错误:

from numpy import array,arccosh,random_integers
ImportError: cannot import name random_integers
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?谢谢.

avr*_*mov 5

我没有使用过NumPy的经验,但快速的谷歌搜索告诉我random_ingegers实际上是在numpy.random.那么from numpy.random import random_integers,也许吧?