我有关于类型的错误。它来自储料器。我不知道代码错误在哪里
环境: python 3.7 numpy和其他libray是最新的
TypeError Traceback (most recent call last)
<ipython-input-6-00eba8b188be> in <module>
----> 3 amazon.changepoint_prior_analysis(changepoint_priors=[0.001, 0.01, 0.06, 0.2])
~\Desktop\master\stocker.py in changepoint_prior_analysis(self, changepoint_priors, colors)
427 ax.fill_between(predictions['ds'].dt.to_pydatetime(), predictions['%.3f_yhat_upper' % prior],
428 predictions['%.3f_yhat_lower' % prior], facecolor = color_dict[prior],
--> 429 alpha = 0.3, edgecolor = 'k', linewidth = 0.6)
430
431 # Plot labels
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\__init__.py in inner(ax, data, *args, **kwargs)
1599 def inner(ax, *args, data=None, **kwargs):
1600 if data is None:
-> 1601 return func(ax, *map(sanitize_sequence, args), **kwargs)
1602
1603 bound = new_sig.bind(ax, *args, **kwargs)
~\AppData\Roaming\Python\Python37\site-packages\matplotlib\axes\_axes.py in fill_between(self, x, y1, y2, where, interpolate, step, **kwargs)
5222
5223 # Convert the arrays so we can work with them
-> 5224 x = ma.masked_invalid(self.convert_xunits(x))
5225 y1 = ma.masked_invalid(self.convert_yunits(y1))
5226 y2 = ma.masked_invalid(self.convert_yunits(y2))
~\AppData\Roaming\Python\Python37\site-packages\numpy\ma\core.py in masked_invalid(a, copy)
2364 cls = type(a)
2365 else:
-> 2366 condition = ~(np.isfinite(a))
2367 cls = MaskedArray
2368 result = a.view(cls)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
我希望显示完整的图表,但现在实际缺少一些事件。