Skip to content

Commit e254b30

Browse files
amuellerrth
authored andcommitted
MAINT run latest CI on Python 3.8 (scikit-learn#15637)
1 parent 6024894 commit e254b30

File tree

8 files changed

+32
-3
lines changed

8 files changed

+32
-3
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
pylatest_pip_openblas_pandas:
6969
DISTRIB: 'conda-pip-latest'
7070
# FIXME: pinned until SciPy wheels are available for Pyhon 3.8
71-
PYTHON_VERSION: '3.7'
71+
PYTHON_VERSION: '3.8'
7272
PYTEST_VERSION: '4.6.2'
7373
COVERAGE: 'true'
7474
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'

sklearn/ensemble/tests/test_partial_dependence.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from sklearn.utils._testing import ignore_warnings
1616

1717

18+
# TODO: Remove when https://github.com/numpy/numpy/issues/14397 is resolved
19+
pytestmark = pytest.mark.filterwarnings(
20+
"ignore:In future, it will be an error for 'np.bool_':DeprecationWarning:"
21+
"matplotlib.*")
22+
23+
1824
# toy sample
1925
X = [[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1]]
2026
y = [-1, -1, -1, 1, 1, 1]

sklearn/inspection/tests/test_plot_partial_dependence.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from sklearn.inspection import plot_partial_dependence
1616

1717

18+
# TODO: Remove when https://github.com/numpy/numpy/issues/14397 is resolved
19+
pytestmark = pytest.mark.filterwarnings(
20+
"ignore:In future, it will be an error for 'np.bool_':DeprecationWarning:"
21+
"matplotlib.*")
22+
23+
1824
@pytest.fixture(scope="module")
1925
def boston():
2026
return load_boston()

sklearn/linear_model/tests/test_bayes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def test_ard_accuracy_on_easy_problem():
209209
X = np.random.RandomState(seed=seed).normal(size=(250, 3))
210210
y = X[:, 1]
211211

212-
regressor = ARDRegression()
212+
regressor = ARDRegression(n_iter=600)
213213
regressor.fit(X, y)
214214

215215
abs_coef_error = np.abs(1 - regressor.coef_[1])

sklearn/metrics/_plot/tests/test_plot_confusion_matrix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
from sklearn.metrics import ConfusionMatrixDisplay
1717

1818

19+
# TODO: Remove when https://github.com/numpy/numpy/issues/14397 is resolved
20+
pytestmark = pytest.mark.filterwarnings(
21+
"ignore:In future, it will be an error for 'np.bool_':DeprecationWarning:"
22+
"matplotlib.*")
23+
1924
@pytest.fixture(scope="module")
2025
def n_classes():
2126
return 5

sklearn/metrics/_plot/tests/test_plot_precision_recall.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from sklearn.compose import make_column_transformer
1616

1717

18+
# TODO: Remove when https://github.com/numpy/numpy/issues/14397 is resolved
19+
pytestmark = pytest.mark.filterwarnings(
20+
"ignore:In future, it will be an error for 'np.bool_':DeprecationWarning:"
21+
"matplotlib.*")
22+
23+
1824
def test_errors(pyplot):
1925
X, y_multiclass = make_classification(n_classes=3, n_samples=50,
2026
n_informative=3,

sklearn/metrics/_plot/tests/test_plot_roc_curve.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
from sklearn.compose import make_column_transformer
1515

1616

17+
# TODO: Remove when https://github.com/numpy/numpy/issues/14397 is resolved
18+
pytestmark = pytest.mark.filterwarnings(
19+
"ignore:In future, it will be an error for 'np.bool_':DeprecationWarning:"
20+
"matplotlib.*")
21+
22+
1723
@pytest.fixture(scope="module")
1824
def data():
1925
return load_iris(return_X_y=True)

sklearn/neighbors/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def _radius_neighbors_from_graph(graph, radius, return_distance):
262262
"""
263263
assert graph.format == 'csr'
264264

265-
no_filter_needed = graph.data.max() <= radius
265+
no_filter_needed = bool(graph.data.max() <= radius)
266266

267267
if no_filter_needed:
268268
data, indices, indptr = graph.data, graph.indices, graph.indptr

0 commit comments

Comments
 (0)