Skip to content

Commit 122a6fe

Browse files
committed
fix pyarrow issue
1 parent 3929828 commit 122a6fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/whatsnew/v1.2.0.rst

-1
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,6 @@ ExtensionArray
751751
- Fixed an inconsistency in :class:`.PeriodArray`'s ``__init__`` signature to those of :class:`.DatetimeArray` and :class:`.TimedeltaArray` (:issue:`37289`)
752752
- Reductions for :class:`.BooleanArray`, :class:`.Categorical`, :class:`.DatetimeArray`, :class:`.FloatingArray`, :class:`.IntegerArray`, :class:`.PeriodArray`, :class:`.TimedeltaArray`, and :class:`.PandasArray` are now keyword-only methods (:issue:`37541`)
753753
- Fixed a bug where a `ValueError` was wrongly raised if a membership check was made on an `ExtensionArray` containing nan-like values (:issue:`37867`)
754-
- Bug, where a `ValueError` was wrongly raised if a membership check was made on an `ExtensionArray` with :class:`NA` values, but without a custom ``__contains__`` method (:issue:`37867`)
755754

756755
Other
757756
^^^^^

pandas/tests/extension/base/interface.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ def test_contains(self, data):
3636
assert scalar in data
3737

3838
na_value = data.dtype.na_value
39-
other_na_value_types = {None, np.nan, pd.NA, pd.NaT}.difference({na_value})
4039

4140
if data.isna().any():
4241
assert na_value in data
4342
else:
4443
assert na_value not in data
4544

46-
for na_value_type in other_na_value_types:
45+
for na_value_type in {None, np.nan, pd.NA, pd.NaT}:
46+
if na_value_type is na_value:
47+
continue
4748
assert na_value_type not in data
4849

4950
def test_memory_usage(self, data):

0 commit comments

Comments
 (0)