Skip to content

Commit

Permalink
CLN: making copies of targets and values (pandas-dev#35498)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhlim committed Sep 14, 2020
1 parent a662559 commit 7fcb14f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/_libs/index.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ cdef class IndexEngine:
targets_mask = isnaobj(targets)
values_mask = isnaobj(values)
if targets_mask.any():
targets_copy = targets.copy()
values_copy = values.copy()
targets[targets_mask] = 0
values[values_mask] = 0

Expand Down

0 comments on commit 7fcb14f

Please sign in to comment.