Skip to content

Commit ab32d9c

Browse files
committed
Simplify the subfunction permutation
1 parent 73f88a5 commit ab32d9c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas/core/arrays/base.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,7 @@ def permutation(mask):
412412
# Return a permutation which maps the indices of the
413413
# subarray without nan to the indices of the original array.
414414
permu = np.arange(len(mask))
415-
nan_loc = np.arange(len(mask))[mask]
416-
offset = 0
417-
for x in nan_loc:
418-
permu[x - offset:] += 1
419-
offset += 1
415+
permu = permu[~mask]
420416
return permu
421417

422418
if mask.any():

0 commit comments

Comments
 (0)