Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion pandas/core/dtypes/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ def _array_equivalent_datetimelike(left, right):
return np.array_equal(left.view("i8"), right.view("i8"))


def _array_equivalent_object(left, right, strict_nan):
def _array_equivalent_object(
left: np.ndarray, right: np.ndarray, strict_nan: bool
) -> bool:
if not strict_nan:
# isna considers NaN and None to be equivalent.
return lib.array_equivalent_object(
Expand Down Expand Up @@ -498,6 +500,15 @@ def _array_equivalent_object(left, right, strict_nan):
elif "boolean value of NA is ambiguous" in str(err):
return False
raise
except SystemError as err:
# 2021-03-01 npdev is raising with
# > raise TypeError("boolean value of NA is ambiguous")
# SystemError: <class 'TypeError'> returned a result with
# an error set
if "boolean value of NA is ambiguous" in str(err):
return False
raise

return True


Expand Down