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 e6c8392 commit 1f51297Copy full SHA for 1f51297
cf_xarray/groupers.py
@@ -13,7 +13,7 @@ def factorize(self, group) -> EncodedGroups:
13
14
if group.dtype.kind in "iu" and (np.diff(values) == 1).all():
15
# optimize
16
- codes = group.data - group.data[0].astype(int)
+ codes = group.data - values[0].astype(int)
17
else:
18
codes, _ = pd.factorize(group.data.ravel())
19
0 commit comments