Traceback (most recent call last): File "F:\pythonproject\ARIMA-GRACH\4.py", line 37, in <module> plt.fill_between(test_data.index, forecast_upper, forecast_lower, color='gray', alpha=0.2) File "E:\anaconda\lib\site-packages\matplotlib\pyplot.py", line 2543, in fill_between return gca().fill_between( File "E:\anaconda\lib\site-packages\matplotlib\__init__.py", line 1412, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "E:\anaconda\lib\site-packages\matplotlib\axes\_axes.py", line 5252, in fill_between return self._fill_between_x_or_y( File "E:\anaconda\lib\site-packages\matplotlib\axes\_axes.py", line 5173, in _fill_between_x_or_y where = where & ~functools.reduce( ValueError: operands could not be broadcast together with shapes (180,) (64800,)
时间: 2023-08-01 22:10:20 浏览: 134
Mac下anaconda中Spyder打开报错Traceback(most recent call last)…问题
5星 · 资源好评率100%
这个错误是因为 `forecast_upper` 和 `forecast_lower` 的长度与 `test_data.index` 不匹配,导致无法进行填充操作。你需要检查一下这两个变量的长度是否正确,并且与 `test_data.index` 保持一致。如果长度不一致,你需要重新计算 `forecast_upper` 和 `forecast_lower`,使它们的长度与 `test_data.index` 保持一致。
阅读全文