optimizer_xarray_builder#
- pymc_marketing.mmm.budget_optimizer.optimizer_xarray_builder(value, **kwargs)[source]#
Create an xarray.DataArray with flexible dimensions and coordinates.
- Parameters:
- - value (array-like): The data values for the DataArray. Shape must match the dimensions implied by the kwargs.
- - **kwargs: Key-value pairs representing dimension names and their corresponding coordinates.
- Returns:
- xarray.DataArray:
The
resulting
DataArray
with
the
specified
dimensions
and
values.
- xarray.DataArray:
- Raises:
- ValueError:
If
the
shape
ofvalue
doesn’tmatch
the
lengths
ofthe
specified
coordinates.
- ValueError: