File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1325,8 +1325,8 @@ def group_rank(
1325
1325
mask = sub_mask,
1326
1326
)
1327
1327
for i in range (len (result)):
1328
- # TODO: why can't we do out[:, k] = result?
1329
- out[i, k] = result[i]
1328
+ if labels[i] >= 0 :
1329
+ out[i, k] = result[i]
1330
1330
1331
1331
1332
1332
# ----------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -623,10 +623,6 @@ def _call_cython_op(
623
623
624
624
result = result .T
625
625
626
- if self .how == "rank" and self .has_dropped_na :
627
- # TODO: Wouldn't need this if group_rank supported mask
628
- result = np .where (comp_ids < 0 , np .nan , result )
629
-
630
626
if self .how not in self .cast_blocklist :
631
627
# e.g. if we are int64 and need to restore to datetime64/timedelta64
632
628
# "rank" is the only member of cast_blocklist we get here
You can’t perform that action at this time.
0 commit comments