We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40bb0ca commit 8db5a5fCopy full SHA for 8db5a5f
pandas/_libs/lib.pyx
@@ -581,7 +581,8 @@ def array_equivalent_object(left: object[:], right: object[:]) -> bool:
581
return False
582
elif (x is C_NA) ^ (y is C_NA):
583
584
- elif np.size(x) != np.size(y):
+ # Only compare scalars to scalars and arrays to arrays
585
+ elif cnp.PyArray_IsAnyScalar(x) != cnp.PyArray_IsAnyScalar(y):
586
587
elif not (PyObject_RichCompareBool(x, y, Py_EQ) or
588
(x is None or is_nan(x)) and (y is None or is_nan(y))):
0 commit comments