Skip to content

Commit ea26b27

Browse files
Backport PR #50268 on branch 1.5.x ( CI new numpy nightly failing some tests) (#50272)
Backport PR #50268: CI new numpy nightly failing some tests Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent f9566aa commit ea26b27

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/series/methods/test_describe.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import numpy as np
2+
import pytest
3+
4+
from pandas.compat import is_numpy_dev
25

36
from pandas.core.dtypes.common import (
47
is_complex_dtype,
@@ -163,6 +166,12 @@ def test_numeric_result_dtype(self, any_numeric_dtype):
163166
dtype = "complex128" if is_complex_dtype(any_numeric_dtype) else None
164167

165168
ser = Series([0, 1], dtype=any_numeric_dtype)
169+
if dtype == "complex128" and is_numpy_dev:
170+
with pytest.raises(
171+
TypeError, match=r"^a must be an array of real numbers$"
172+
):
173+
ser.describe()
174+
return
166175
result = ser.describe()
167176
expected = Series(
168177
[

0 commit comments

Comments
 (0)