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
We currently convert all coordinates to tuples, but this removes valuable information, if the coordinates already are a pandas Index.
I think we should only convert the input values if they are not already a pandas index, and if they are not we should wrap them in an pd.Index instead of a tuple. This is also immutable, but preserves the meaning of a coordinate.
importpymcaspmimportpandasaspdcoords= {
"dim": pd.date_range(start="2022-01-01", end="2022-02-01")
}
withpm.Model(coords=coords) asmodel:
pm.Normal("x")
type(model.coords["dim"]) # -> tuple# We lost the valuable information from the original pandas `DatetimeIndex`.