variable_layout#

pymc_marketing.pytensor_utils.variable_layout(posterior_da, *, sample_dims)[source]#

Record the non-sample dims, labels and shape of posterior_da.

Parameters:
  • posterior_da (DataArray) – A posterior variable.

  • sample_dims (tuple[str, ...]) – The dims that index draws, such as ("chain", "draw") or ("sample",).

Return type:

VariableLayout

Returns:

Its non-sample dims in storage order, the labels of the labeled ones and their lengths.