diff --git a/pandas/core/arrays/boolean.py b/pandas/core/arrays/boolean.py index 2d7bae7833f29..389854aa8e38d 100644 --- a/pandas/core/arrays/boolean.py +++ b/pandas/core/arrays/boolean.py @@ -397,7 +397,7 @@ def _logical_method(self, other, op): if isinstance(other, BooleanArray): other, mask = other._data, other._mask elif is_list_like(other): - other = np.asarray(other, dtype="bool") + other = np.asarray(other, dtype=object) if other.ndim > 1: return NotImplemented other, mask = coerce_to_array(other, copy=False) diff --git a/pandas/tests/arrays/boolean/test_ops.py b/pandas/tests/arrays/boolean/test_ops.py index 95ebe8528c2e5..8acf502af8517 100644 --- a/pandas/tests/arrays/boolean/test_ops.py +++ b/pandas/tests/arrays/boolean/test_ops.py @@ -25,3 +25,9 @@ def test_abs(self): result = abs(arr) tm.assert_extension_array_equal(result, arr) + + def test_booleanarray_and_list_with_na(self): + b = pd.array([True, False], dtype="boolean") + result = b & [pd.NA, False] + expected = pd.array([pd.NA, False], dtype="boolean") + tm.assert_extension_array_equal(result, expected)