xarray.core.variable.MissingDimensionsError: 'x' has more than 1-dimension and the same name as one of its dimensions ('y', 'x'). xarray disallows such variables because they conflict with the coordinates used to label dimensions.
We should check before the calculations are performed if there is a kwarg name that is problematic and give a better error message. Invalid names are x and y, also n if using a *_n reduction, also the name of any categorical column used in a by reduction.
Some
kwarg
names are not allowed in asummary
reduction and produce anxarray
error when trying to convert to aDataset
. Example:Error produced is
We should check before the calculations are performed if there is a
kwarg
name that is problematic and give a better error message. Invalid names arex
andy
, alson
if using a*_n
reduction, also the name of any categorical column used in aby
reduction.