要用Repeat ()替代Numpy.dot(),我写的代码报错没看懂
我写的是:
import numpy as np
arr71 = np.array([0.065, 0.148, 0.217, -0.126, 0.089])
arr72 = np.array([0.15, 0.30, 0.22, 0.23, 0.10])
arr73 = np.dot(arr71, arr72)
arr74 = np.repeats(arr73)
print(arr74)
但是arr74出现报错,显示的是这个:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_150896/859011211.py in <module>
1 # d. Write your code here
----> 2 arr74 = np.repeats(arr73)
3 print(arr74)
E:\python\lib\site-packages\numpy\__init__.py in __getattr__(attr)
301 return Tester
302
--> 303 raise AttributeError("module {!r} has no attribute "
304 "{!r}".format(__name__, attr))
305
AttributeError: module 'numpy' has no attribute 'repeats'
请问怎么解决