We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
time
build_statespace_graph
1 parent 960d682 commit aeb1b77Copy full SHA for aeb1b77
pymc_experimental/statespace/utils/data_tools.py
@@ -114,6 +114,16 @@ def add_data_to_active_model(values, index):
114
115
if TIME_DIM not in pymc_mod.coords:
116
pymc_mod.add_coord(TIME_DIM, index, mutable=True)
117
+ else:
118
+ found_time = pymc_mod.coords[TIME_DIM]
119
+ if found_time is None:
120
+ pymc_mod.coords.update({TIME_DIM: index})
121
+ elif not np.array_equal(found_time, index):
122
+ raise ValueError(
123
+ "Provided data has a different time index than the model. Please ensure that the time values "
124
+ "set on coords matches that of the exogenous data."
125
+ )
126
+
127
data = pm.ConstantData("data", values, dims=data_dims)
128
129
return data
0 commit comments