943 is a timestep across all locations. I’m not sure if it matters but it’s 60 timesteps across the various locations.
When I take the dims out of “trend,” I get a shape error around the fourier transformations now:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_6258/1969810355.py in <module>
92 )
93
---> 94 trace = pymc.sampling_jax.sample_numpyro_nuts(tune=2000, draws = 2000)
95 # pm.model_to_graphviz( partial_pooled_model)
96
/opt/conda/lib/python3.7/site-packages/pymc/sampling_jax.py in sample_numpyro_nuts(draws, tune, chains, target_accept, random_seed, initvals, model, var_names, progress_bar, keep_untransformed, chain_method, postprocessing_backend, idata_kwargs, nuts_kwargs)
568 dims=dims,
569 attrs=make_attrs(attrs, library=numpyro),
--> 570 **idata_kwargs,
571 )
572
/opt/conda/lib/python3.7/site-packages/arviz/data/io_dict.py in from_dict(posterior, posterior_predictive, predictions, sample_stats, log_likelihood, prior, prior_predictive, sample_stats_prior, observed_data, constant_data, predictions_constant_data, warmup_posterior, warmup_posterior_predictive, warmup_predictions, warmup_log_likelihood, warmup_sample_stats, save_warmup, index_origin, coords, dims, pred_dims, pred_coords, attrs, **kwargs)
457 pred_coords=pred_coords,
458 attrs=attrs,
--> 459 **kwargs,
460 ).to_inference_data()
/opt/conda/lib/python3.7/site-packages/arviz/data/io_dict.py in to_inference_data(self)
333 return InferenceData(
334 **{
--> 335 "posterior": self.posterior_to_xarray(),
336 "sample_stats": self.sample_stats_to_xarray(),
337 "log_likelihood": self.log_likelihood_to_xarray(),
/opt/conda/lib/python3.7/site-packages/arviz/data/base.py in wrapped(cls)
63 if all((getattr(cls, prop_i) is None for prop_i in prop)):
64 return None
---> 65 return func(cls)
66
67 return wrapped
/opt/conda/lib/python3.7/site-packages/arviz/data/io_dict.py in posterior_to_xarray(self)
102 dims=self.dims,
103 attrs=posterior_attrs,
--> 104 index_origin=self.index_origin,
105 ),
106 dict_to_dataset(
/opt/conda/lib/python3.7/site-packages/arviz/data/base.py in dict_to_dataset(data, attrs, library, coords, dims, default_dims, index_origin, skip_event_dims)
312 default_dims=default_dims,
313 index_origin=index_origin,
--> 314 skip_event_dims=skip_event_dims,
315 )
316 return xr.Dataset(data_vars=data_vars, attrs=make_attrs(attrs=attrs, library=library))
/opt/conda/lib/python3.7/site-packages/arviz/data/base.py in numpy_to_data_array(ary, var_name, coords, dims, default_dims, index_origin, skip_event_dims)
252 # filter coords based on the dims
253 coords = {key: xr.IndexVariable((key,), data=np.asarray(coords[key])) for key in dims}
--> 254 return xr.DataArray(ary, coords=coords, dims=dims)
255
256
/opt/conda/lib/python3.7/site-packages/xarray/core/dataarray.py in __init__(self, data, coords, dims, name, attrs, indexes, fastpath)
404 data = _check_data_shape(data, coords, dims)
405 data = as_compatible_data(data)
--> 406 coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
407 variable = Variable(dims, data, attrs, fastpath=True)
408 indexes = dict(
/opt/conda/lib/python3.7/site-packages/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims)
153 if s != sizes[d]:
154 raise ValueError(
--> 155 f"conflicting sizes for dimension {d!r}: "
156 f"length {sizes[d]} on the data but length {s} on "
157 f"coordinate {k!r}"
ValueError: conflicting sizes for dimension 'location': length 20 on the data but length 943 on coordinate 'location'