Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley committed Sep 27, 2023
1 parent 5a8508b commit c5acd57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,12 @@ def duplicated(
>>> pd.array([1, 1, 2, 3, 3], dtype="Int64").duplicated()
array([False, True, False, False, True])
"""
return duplicated(values=self, keep=keep, mask=self.isna())
null_mask = self.isna()
if isinstance(null_mask, np.ndarray):
mask = null_mask
else:
mask = None
return duplicated(values=self, keep=keep, mask=mask)

def shift(self, periods: int = 1, fill_value: object = None) -> ExtensionArray:
"""
Expand Down

0 comments on commit c5acd57

Please sign in to comment.