【发布时间】:2020-02-04 14:53:01
【问题描述】:
我是初学者,写了如下代码:
wn=np.random.normal(loc=raw_data.Quantity.mean(), scale=raw_data.Quantity.std(), size=len(training_data))
training_data['wn']=wn
training_data.wn.plot(figsize=(20,5), title="LOL")
plt.title('White Noise')
plt.ylim(0,2400)
plt.show()
它给出了以下错误:
AttributeError: 'numpy.ndarray' 对象没有属性 'plot'
以下是白噪声的值:
在[140]:wn
出[140]:数组([313.12254531, 43.56086818, 298.21441411, ..., -50.96308586, 193.43057718, 242.80841993])
谁能帮我解决这个问题?
【问题讨论】:
标签: python python-3.x numpy matplotlib whitenoise