diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 6d4afb9553d..cffa153bf14 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -2925,7 +2925,12 @@ def _validate_interp_indexers( elif is_scalar(v): yield k, Variable((), v, attrs=self.coords[k].attrs) elif isinstance(v, np.ndarray): - yield k, Variable(dims=(k,), data=v, attrs=self.coords[k].attrs, fastpath=True) + yield ( + k, + Variable( + dims=(k,), data=v, attrs=self.coords[k].attrs, fastpath=True + ), + ) else: raise TypeError(type(v))