Skip to content

Commit f313841

Browse files
committed
CLN: resolve dep warning in _testing pandas-dev#35942
1 parent a1f6056 commit f313841

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/_testing.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,11 @@ def _get_ilevel_values(index, level):
787787
# skip exact index checking when `check_categorical` is False
788788
if check_exact and check_categorical:
789789
if not left.equals(right):
790-
diff = np.sum((left.values != right.values).astype(int)) * 100.0 / len(left)
790+
diff = (
791+
np.sum((np.not_equal(left.values, right.values)).astype(int))
792+
* 100.0
793+
/ len(left)
794+
)
791795
msg = f"{obj} values are different ({np.round(diff, 5)} %)"
792796
raise_assert_detail(obj, msg, left, right)
793797
else:

0 commit comments

Comments
 (0)