@@ -869,7 +869,9 @@ def group_last(rank_t[:, :] out,
869
869
870
870
assert min_count == - 1 , " 'min_count' only used in add and prod"
871
871
872
- if not len (values) == len (labels):
872
+ # TODO(cython 3.0):
873
+ # Instead of `labels.shape[0]` use `len(labels)`
874
+ if not len (values) == labels.shape[0 ]:
873
875
raise AssertionError (" len(index) != len(labels)" )
874
876
875
877
nobs = np.zeros((< object > out).shape, dtype = np.int64)
@@ -960,7 +962,9 @@ def group_nth(rank_t[:, :] out,
960
962
961
963
assert min_count == - 1 , " 'min_count' only used in add and prod"
962
964
963
- if not len (values) == len (labels):
965
+ # TODO(cython 3.0):
966
+ # Instead of `labels.shape[0]` use `len(labels)`
967
+ if not len (values) == labels.shape[0 ]:
964
968
raise AssertionError (" len(index) != len(labels)" )
965
969
966
970
nobs = np.zeros((< object > out).shape, dtype = np.int64)
@@ -1254,7 +1258,9 @@ def group_max(groupby_t[:, :] out,
1254
1258
1255
1259
assert min_count == - 1 , " 'min_count' only used in add and prod"
1256
1260
1257
- if not len (values) == len (labels):
1261
+ # TODO(cython 3.0):
1262
+ # Instead of `labels.shape[0]` use `len(labels)`
1263
+ if not len (values) == labels.shape[0 ]:
1258
1264
raise AssertionError (" len(index) != len(labels)" )
1259
1265
1260
1266
nobs = np.zeros((< object > out).shape, dtype = np.int64)
@@ -1327,7 +1333,9 @@ def group_min(groupby_t[:, :] out,
1327
1333
1328
1334
assert min_count == - 1 , " 'min_count' only used in add and prod"
1329
1335
1330
- if not len (values) == len (labels):
1336
+ # TODO(cython 3.0):
1337
+ # Instead of `labels.shape[0]` use `len(labels)`
1338
+ if not len (values) == labels.shape[0 ]:
1331
1339
raise AssertionError (" len(index) != len(labels)" )
1332
1340
1333
1341
nobs = np.zeros((< object > out).shape, dtype = np.int64)
0 commit comments