Closed mike-duran-mitchell closed 4 days ago
Actually resolved this myself using this function to update everything to the dtypes that work in numpy.
def convert_dtypes(x):
if pd.api.types.is_integer_dtype(x):
return x.astype('Int64')
elif pd.api.types.is_float_dtype(x):
return x.astype('Float64')
return x
# Apply the function to the DataFrame
X = X.applymap(convert_dtypes)
Using pymc-marketing v0.9, but also had this happen in 0.8 before updating it to try to get past this error. All values in my df are floats and ints except for date, which is an appropriately formatted datetime column. None of the values are NA when I check isna in pandas, and I used
df.fillna(0)
to make sure. I have 0 divergences in my mmm and I am able to plot the model trace with no issue and do other steps in model inspection. I've tried it with models that have custom priors and models that do not, but I still can't seem to resolve it.When I run
mmm.sample_posterior_predictive(X, extend_idata=True, combined=True)
this error pops out:Any ideas on that?