index_variable#

pymc_marketing.mmm.components.base.index_variable(var, dims, idx)[source]#

Index a variable based on the provided dimensions and index.

Parameters:
varTensorVariable

The variable to index.

dimstuple[str, …]

The dims of the variable.

idxdict[str, pt.TensorLike]

The index to use for the variable.

Returns:
TensorVariable

The indexed variable.