ValueError: The truth value...
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
when i run the code with my data, i got the ValueError
`m = Prophet()`
`m.fit(x)`
> ValueError Traceback (most recent call last)
in
41
42 m = Prophet()
---> 43 m.fit(x)
44
45 future = m.make_future_dataframe(periods=365)
> ~/.local/lib/python3.6/site-packages/prophet/forecaster.py in fit(self, df, **kwargs)
1114 self.history_dates = pd.to_datetime(pd.Series(df['ds'].unique(), name='ds')).sort_values()
1115
-> 1116 history = self.setup_dataframe(history, initialize_scales=True)
1117 self.history = history
1118 self.set_auto_seasonalities()
> ~/.local/lib/python3.6/site-packages/prophet/forecaster.py in setup_dataframe(self, df, initialize_scales)
325 df['t'] = (df['ds'] - self.start) / self.t_scale
326 if 'y' in df:
--> 327 df['y_scaled'] = (df['y'] - df['floor']) / self.y_scale
328
329 for name, props in self.extra_regressors.items():
> ~/.local/lib/python3.6/site-packages/pandas/core/ops/__init__.py in wrapper(left, right)
> ~/.local/lib/python3.6/site-packages/pandas/core/ops/__init__.py in na_op(x, y)
> ~/.local/lib/python3.6/site-packages/pandas/core/computation/expressions.py in evaluate(op, a, b, use_numexpr)
229 if use_numexpr:
230 return _evaluate(op, op_str, a, b) # type: ignore
--> 231 return _evaluate_standard(op, op_str, a, b)
232
233
> ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
i tried downgrade pandas to 1.1.2, and my numexpr version is 2.7.1, fbprophet is 0.7.1, but none of these would help.
how can i solve the problem?
Contributor guide
Assessment
This issue has not been assessed yet.