Skip to content

Commit cd86d6a

Browse files
Daniel SaxtonDaniel Saxton
Daniel Saxton
authored and
Daniel Saxton
committed
Handle NA in assert_numpy_array_equal
1 parent 950e0bf commit cd86d6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/_libs/lib.pyx

+5
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,11 @@ def array_equivalent_object(left: object[:], right: object[:]) -> bool:
571571
if PyArray_Check(x) and PyArray_Check(y):
572572
if not array_equivalent_object(x, y):
573573
return False
574+
elif x is C_NA or y is C_NA:
575+
if x is C_NA and y is C_NA:
576+
return True
577+
else:
578+
return False
574579
elif not (PyObject_RichCompareBool(x, y, Py_EQ) or
575580
(x is None or is_nan(x)) and (y is None or is_nan(y))):
576581
return False

0 commit comments

Comments
 (0)