8000 MNT Ignores warning in pyamg for deprecated scipy.random (#15914) · scikit-learn/scikit-learn@2d687bf · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d687bf

Browse files
thomasjpfanrth
authored andcommitted
MNT Ignores warning in pyamg for deprecated scipy.random (#15914)
1 parent b1a3367 commit 2d687bf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sklearn/cluster/tests/test_spectral.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ def test_discretize(n_samples):
191191
assert adjusted_rand_score(y_true, y_pred) > 0.8
192192

193193

194+
# TODO: Remove when pyamg does replaces sp.rand call with np.random.rand
195+
# https://github.com/scikit-learn/scikit-learn/issues/15913
196+
@pytest.mark.filterwarnings(
197+
"ignore:scipy.rand is deprecated:DeprecationWarning:pyamg.*")
194198
def test_spectral_clustering_with_arpack_amg_solvers():
195199
# Test that spectral_clustering is the same for arpack and amg solver
196200
# Based on toy example from plot_segmentation_toy.py

sklearn/manifold/tests/test_spectral_embedding.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ def test_spectral_embedding_callable_affinity(X, seed=36):
181181
assert _check_with_col_sign_flipping(embed_rbf, embed_callable, 0.05)
182182

183183

184+
# TODO: Remove when pyamg does replaces sp.rand call with np.random.rand
185+
# https://github.com/scikit-learn/scikit-learn/issues/15913
186+
@pytest.mark.filterwarnings(
187+
"ignore:scipy.rand is deprecated:DeprecationWarning:pyamg.*")
184188
def test_spectral_embedding_amg_solver(seed=36):
185189
# Test spectral embedding with amg solver
186190
pytest.importorskip('pyamg')
@@ -211,6 +215,10 @@ def test_spectral_embedding_amg_solver(seed=36):
211215
assert _check_with_col_sign_flipping(embed_amg, embed_arpack, 1e-5)
212216

213217

218+
# TODO: Remove when pyamg does replaces sp.rand call with np.random.rand
219+
# https://github.com/scikit-learn/scikit-learn/issues/15913
220+
@pytest.mark.filterwarnings(
221+
"ignore:scipy.rand is deprecated:DeprecationWarning:pyamg.*")
214222
def test_spectral_embedding_amg_solver_failure(seed=36):
215223
# Test spectral embedding with amg solver failure, see issue #13393
< 3C98 /code>
216224
pytest.importorskip('pyamg')

0 commit comments

Comments
 (0)
0