Skip to content

Commit

Permalink
Update masked.py
Browse files Browse the repository at this point in the history
Make black and ruff happy.

Signed-off-by: Michael Tiemann <[email protected]>
  • Loading branch information
MichaelTiemannOSC committed Jul 2, 2023
1 parent 4c04e30 commit a165278
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas/core/arrays/masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,9 @@ def take(
# we only fill where the indexer is null
# not existing missing values
# TODO(jreback) what if we have a non-na float as a fill value?
# NaN with uncertainties is scalar but does not register as `isna`, so use fact that NaN != NaN
if allow_fill and notna(fill_value) and fill_value==fill_value:
# NaN with uncertainties is scalar but does not register as `isna`,
# so use fact that NaN != NaN
if allow_fill and notna(fill_value) and fill_value == fill_value:
fill_mask = np.asarray(indexer) == -1
result[fill_mask] = fill_value
mask = mask ^ fill_mask
Expand Down

0 comments on commit a165278

Please sign in to comment.