check_aligned_shape#
- pymc_marketing.pytensor_utils.check_aligned_shape(name, shape, layout)[source]#
Raise if the non-sample
shapediffers from the constructed one.- Parameters:
name (
str) – The posterior variable, named in the error.shape (
tuple[int,...]) – Its non-sample shape, in the layout’s dim order.layout (
VariableLayout) – The layout the variable was constructed with.
- Raises:
ValueError – If
shapediffers fromlayout.shape. Only the sample dimension may change length.