drop_scalar_coords#

pymc_marketing.plot.drop_scalar_coords(curve)[source]#

Remove scalar coordinates from an xarray DataArray.

This function identifies and removes scalar coordinates from the given DataArray. Scalar coordinates are those with a single value that are not part of the DataArray’s indexes. The function returns a new DataArray with the scalar coordinates removed.

Parameters:

curve (DataArray) – The input DataArray from which scalar coordinates will be removed.

Return type:

xr.DataArray

Returns:

A new DataArray with the identified scalar coordinates removed.