You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the example associated with the tvp entry in the API docs fails:
AttributeErrorTraceback (mostrecentcalllast)
CellIn[1], line129sales=np.random.normal(100, 10, size=len(dates))
11# Infer time index--->12time_index=infer_time_index(dates, dates, time_resolution=5)
14# Define model configuration15model_config= {
16"sales_tvp_config": {
17"m": 200,
(...)
23 }
24 }
File~/labs/pymc-marketing/pymc_marketing/mmm/tvp.py:261, ininfer_time_index(date_series_new, date_series, time_resolution)
237definfer_time_index(
238date_series_new: pd.Series,
239date_series: pd.Series,
240time_resolution: int,
241 ) ->npt.NDArray[np.int_]:
242"""Infer the time-index given a new dataset. 243 244 Infers the time-indices by calculating the number of days since the first date in the dataset. (...) 259 260 """-->261return (date_series_new-date_series.iloc[0]).dt.days.values//time_resolutionAttributeError: 'DatetimeIndex'objecthasnoattribute'iloc'
Running the example associated with the
tvp
entry in the API docs fails:Environment details:
Python version : 3.10.16
pymc_marketing: 0.11.1
pymc : 5.21.0
arviz : 0.20.0
numpy : 1.26.4
pandas : 2.2.3
The text was updated successfully, but these errors were encountered: