Skip to content

Commit 1f51297

Browse files
committed
fix
1 parent e6c8392 commit 1f51297

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cf_xarray/groupers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def factorize(self, group) -> EncodedGroups:
1313

1414
if group.dtype.kind in "iu" and (np.diff(values) == 1).all():
1515
# optimize
16-
codes = group.data - group.data[0].astype(int)
16+
codes = group.data - values[0].astype(int)
1717
else:
1818
codes, _ = pd.factorize(group.data.ravel())
1919

0 commit comments

Comments
 (0)