Skip to content

Commit 9820c42

Browse files
authored
CLN: remove xfails/skips for no-longer-supported numpys (#36128)
1 parent 6016b17 commit 9820c42

File tree

5 files changed

+10
-64
lines changed

5 files changed

+10
-64
lines changed

pandas/plotting/_matplotlib/style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
def get_standard_colors(
14-
num_colors=None, colormap=None, color_type: str = "default", color=None
14+
num_colors: int, colormap=None, color_type: str = "default", color=None
1515
):
1616
import matplotlib.pyplot as plt
1717

pandas/tests/arrays/sparse/test_array.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ def test_constructor_inferred_fill_value(self, data, fill_value):
194194

195195
@pytest.mark.parametrize("format", ["coo", "csc", "csr"])
196196
@pytest.mark.parametrize(
197-
"size",
198-
[pytest.param(0, marks=td.skip_if_np_lt("1.16", reason="NumPy-11383")), 10],
197+
"size", [0, 10],
199198
)
200199
@td.skip_if_no_scipy
201200
def test_from_spmatrix(self, size, format):
@@ -904,7 +903,6 @@ def test_all(self, data, pos, neg):
904903
([1.0, 2.0, 1.0], 1.0, 0.0),
905904
],
906905
)
907-
@td.skip_if_np_lt("1.15") # prior didn't dispatch
908906
def test_numpy_all(self, data, pos, neg):
909907
# GH 17570
910908
out = np.all(SparseArray(data))
@@ -956,7 +954,6 @@ def test_any(self, data, pos, neg):
956954
([0.0, 2.0, 0.0], 2.0, 0.0),
957955
],
958956
)
959-
@td.skip_if_np_lt("1.15") # prior didn't dispatch
960957
def test_numpy_any(self, data, pos, neg):
961958
# GH 17570
962959
out = np.any(SparseArray(data))

pandas/tests/frame/test_analytics.py

+8-50
Original file line numberDiff line numberDiff line change
@@ -1060,54 +1060,14 @@ def test_any_all_bool_only(self):
10601060
(np.any, {"A": pd.Series([0.0, 1.0], dtype="float")}, True),
10611061
(np.all, {"A": pd.Series([0, 1], dtype=int)}, False),
10621062
(np.any, {"A": pd.Series([0, 1], dtype=int)}, True),
1063-
pytest.param(
1064-
np.all,
1065-
{"A": pd.Series([0, 1], dtype="M8[ns]")},
1066-
False,
1067-
marks=[td.skip_if_np_lt("1.15")],
1068-
),
1069-
pytest.param(
1070-
np.any,
1071-
{"A": pd.Series([0, 1], dtype="M8[ns]")},
1072-
True,
1073-
marks=[td.skip_if_np_lt("1.15")],
1074-
),
1075-
pytest.param(
1076-
np.all,
1077-
{"A": pd.Series([1, 2], dtype="M8[ns]")},
1078-
True,
1079-
marks=[td.skip_if_np_lt("1.15")],
1080-
),
1081-
pytest.param(
1082-
np.any,
1083-
{"A": pd.Series([1, 2], dtype="M8[ns]")},
1084-
True,
1085-
marks=[td.skip_if_np_lt("1.15")],
1086-
),
1087-
pytest.param(
1088-
np.all,
1089-
{"A": pd.Series([0, 1], dtype="m8[ns]")},
1090-
False,
1091-
marks=[td.skip_if_np_lt("1.15")],
1092-
),
1093-
pytest.param(
1094-
np.any,
1095-
{"A": pd.Series([0, 1], dtype="m8[ns]")},
1096-
True,
1097-
marks=[td.skip_if_np_lt("1.15")],
1098-
),
1099-
pytest.param(
1100-
np.all,
1101-
{"A": pd.Series([1, 2], dtype="m8[ns]")},
1102-
True,
1103-
marks=[td.skip_if_np_lt("1.15")],
1104-
),
1105-
pytest.param(
1106-
np.any,
1107-
{"A": pd.Series([1, 2], dtype="m8[ns]")},
1108-
True,
1109-
marks=[td.skip_if_np_lt("1.15")],
1110-
),
1063+
pytest.param(np.all, {"A": pd.Series([0, 1], dtype="M8[ns]")}, False,),
1064+
pytest.param(np.any, {"A": pd.Series([0, 1], dtype="M8[ns]")}, True,),
1065+
pytest.param(np.all, {"A": pd.Series([1, 2], dtype="M8[ns]")}, True,),
1066+
pytest.param(np.any, {"A": pd.Series([1, 2], dtype="M8[ns]")}, True,),
1067+
pytest.param(np.all, {"A": pd.Series([0, 1], dtype="m8[ns]")}, False,),
1068+
pytest.param(np.any, {"A": pd.Series([0, 1], dtype="m8[ns]")}, True,),
1069+
pytest.param(np.all, {"A": pd.Series([1, 2], dtype="m8[ns]")}, True,),
1070+
pytest.param(np.any, {"A": pd.Series([1, 2], dtype="m8[ns]")}, True,),
11111071
(np.all, {"A": pd.Series([0, 1], dtype="category")}, False),
11121072
(np.any, {"A": pd.Series([0, 1], dtype="category")}, True),
11131073
(np.all, {"A": pd.Series([1, 2], dtype="category")}, True),
@@ -1120,8 +1080,6 @@ def test_any_all_bool_only(self):
11201080
"B": pd.Series([10, 20], dtype="m8[ns]"),
11211081
},
11221082
True,
1123-
# In 1.13.3 and 1.14 np.all(df) returns a Timedelta here
1124-
marks=[td.skip_if_np_lt("1.15")],
11251083
),
11261084
],
11271085
)

pandas/tests/io/formats/test_to_csv.py

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212

1313
class TestToCSV:
14-
@pytest.mark.xfail(
15-
(3, 6, 5) > sys.version_info,
16-
reason=("Python csv library bug (see https://bugs.python.org/issue32255)"),
17-
)
1814
def test_to_csv_with_single_column(self):
1915
# see gh-18676, https://bugs.python.org/issue32255
2016
#

pandas/tests/series/test_analytics.py

-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
import pandas.util._test_decorators as td
7-
86
import pandas as pd
97
from pandas import DataFrame, Series
108
import pandas._testing as tm
@@ -130,7 +128,6 @@ def test_is_monotonic(self):
130128

131129
@pytest.mark.parametrize("func", [np.any, np.all])
132130
@pytest.mark.parametrize("kwargs", [dict(keepdims=True), dict(out=object())])
133-
@td.skip_if_np_lt("1.15")
134131
def test_validate_any_all_out_keepdims_raises(self, kwargs, func):
135132
s = pd.Series([1, 2])
136133
param = list(kwargs)[0]
@@ -144,7 +141,6 @@ def test_validate_any_all_out_keepdims_raises(self, kwargs, func):
144141
with pytest.raises(ValueError, match=msg):
145142
func(s, **kwargs)
146143

147-
@td.skip_if_np_lt("1.15")
148144
def test_validate_sum_initial(self):
149145
s = pd.Series([1, 2])
150146
msg = (
@@ -167,7 +163,6 @@ def test_validate_median_initial(self):
167163
# method instead of the ufunc.
168164
s.median(overwrite_input=True)
169165

170-
@td.skip_if_np_lt("1.15")
171166
def test_validate_stat_keepdims(self):
172167
s = pd.Series([1, 2])
173168
msg = (

0 commit comments

Comments
 (0)