check_aligned_dims#
- pymc_marketing.pytensor_utils.check_aligned_dims(name, dims, layout)[source]#
Raise if
dimsis not the dim set the variable was constructed with.The order is free here:
align_posterior_dim()and the final transpose put the axes back in the layout’s order.- Parameters:
name (
str) – The posterior variable, named in the error.dims (
tuple[str,...]) – Its non-sample dims, as returned bynon_sample_dims().layout (
VariableLayout) – The layout the variable was constructed with.
- Raises:
ValueError – If
dimsandlayout.dimsare different sets.