Skip to content

Commit f077a15

Browse files
committed
reset changes in numpy compat
1 parent ed2cc3e commit f077a15

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/tests/indexes/test_numpy_compat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,9 @@ def test_numpy_ufuncs_reductions(index, func, request):
155155
# TODO: overlap with tests.series.test_ufunc.test_reductions
156156
if len(index) == 0:
157157
pytest.skip("Test doesn't make sense for empty index.")
158-
if getattr(index, "inferred_type", None) in {
159-
"mixed",
160-
"mixed-integer",
161-
"mixed-int-string",
162-
}:
158+
has_str = any(isinstance(x, str) for x in index)
159+
has_int = any(isinstance(x, int) for x in index)
160+
if has_str and has_int:
163161
request.applymarker(
164162
pytest.mark.xfail(
165163
reason="Cannot compare mixed types (int and str) in ufunc reductions"

0 commit comments

Comments
 (0)