forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: FloatingArray.__contains__(nan) (pandas-dev#52840)
* BUG: FloatingArray.__contains__(nan) * GH ref * mypy fixup * mypy fixup --------- Co-authored-by: Patrick Hoefler <[email protected]>
- Loading branch information
1 parent
000c3ed
commit f886f13
Showing
4 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import numpy as np | ||
|
||
import pandas as pd | ||
|
||
|
||
def test_contains_nan(): | ||
# GH#52840 | ||
arr = pd.array(range(5)) / 0 | ||
|
||
assert np.isnan(arr._data[0]) | ||
assert not arr.isna()[0] | ||
assert np.nan in arr |