diff --git a/sup3r/preprocessing/accessor.py b/sup3r/preprocessing/accessor.py index 50b9dfb73..598bdeac1 100644 --- a/sup3r/preprocessing/accessor.py +++ b/sup3r/preprocessing/accessor.py @@ -19,7 +19,6 @@ compute_if_dask, dims_array_tuple, is_type_of, - lower_names, ordered_array, ordered_dims, parse_keys, @@ -90,7 +89,7 @@ def __init__(self, ds: Union[xr.Dataset, Self]): ds : xr.Dataset | xr.DataArray xarray Dataset instance to access with the following methods """ - self._ds = lower_names(ds) + self._ds = ds self._features = None self._meta = None self.time_slice = None diff --git a/sup3r/preprocessing/utilities.py b/sup3r/preprocessing/utilities.py index 2f650a71c..8a51fadbf 100644 --- a/sup3r/preprocessing/utilities.py +++ b/sup3r/preprocessing/utilities.py @@ -23,17 +23,16 @@ def lower_names(data): """Set all fields / coords / dims to lower case.""" - return data.rename( - { - f: f.lower() - for f in [ - *list(data.data_vars), - *list(data.dims), - *list(data.coords), - ] - if f != f.lower() - } - ) + rename_map = { + f: f.lower() + for f in [ + *list(data.data_vars), + *list(data.dims), + *list(data.coords), + ] + if f != f.lower() + } + return data.rename(rename_map) def get_input_handler_class(input_handler_name: Optional[str] = None):