We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa542ed commit dc92b07Copy full SHA for dc92b07
1 file changed
xarray/core/indexes.py
@@ -1569,12 +1569,7 @@ def sel(
1569
else:
1570
# Exact matching: check if positions are close to integers
1571
if not np.all(np.abs(pos - (rounded := np.round(pos))) < eps):
1572
- coord_name = (
1573
- self.transform.coord_names[0]
1574
- if len(self.transform.coord_names) == 1
1575
- else dim
1576
- )
1577
- raise KeyError(f"not all values found in index {coord_name!r}")
+ raise KeyError(f"not all values found in index {dim!r}")
1578
pos = rounded.astype("int")
1579
if isinstance(label0_obj, Variable):
1580
results[dim] = Variable(dims0, pos)
0 commit comments