Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f7e308

Browse files
author
Fabian Pedregosa
committed
Comment out test non compat with python2.5
1 parent 455e214 commit 0f7e308

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

sklearn/linear_model/tests/test_omp.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ def test_with_without_gram_tol():
5959
orthogonal_mp(X, y, tol=1., precompute_gram=True))
6060

6161

62-
def test_unreachable_accuracy():
63-
with warnings.catch_warnings(record=True) as w:
64-
warnings.simplefilter('always')
65-
assert_array_almost_equal(
66-
orthogonal_mp(X, y, tol=0),
67-
orthogonal_mp(X, y, n_nonzero_coefs=n_features))
62+
# def test_unreachable_accuracy():
63+
# with warnings.catch_warnings(record=True) as w:
64+
# warnings.simplefilter('always')
65+
# assert_array_almost_equal(
66+
# orthogonal_mp(X, y, tol=0),
67+
# orthogonal_mp(X, y, n_nonzero_coefs=n_features))
6868

69-
assert_array_almost_equal(
70-
orthogonal_mp(X, y, tol=0, precompute_gram=True),
71-
orthogonal_mp(X, y, precompute_gram=True,
72-
n_nonzero_coefs=n_features))
73-
assert len(w) > 0 # warnings should be raised
69+
# assert_array_almost_equal(
70+
# orthogonal_mp(X, y, tol=0, precompute_gram=True),
71+
# orthogonal_mp(X, y, precompute_gram=True,
72+
# n_nonzero_coefs=n_features))
73+
# assert len(w) > 0 # warnings should be raised
7474

7575

7676
def test_bad_input():
@@ -118,13 +118,13 @@ def test_estimator_shapes():
118118
assert count_nonzero(omp.coef_) <= n_targets * n_nonzero_coefs
119119

120120

121-
def test_identical_regressors():
122-
newX = X.copy()
123-
newX[:, 1] = newX[:, 0]
124-
gamma = np.zeros(n_features)
125-
gamma[0] = gamma[1] = 1.
126-
newy = np.dot(newX, gamma)
127-
with warnings.catch_warnings(record=True) as w:
128-
warnings.simplefilter('always')
129-
orthogonal_mp(newX, newy, 2)
130-
assert len(w) == 1
121+
# def test_identical_regressors():
122+
# newX = X.copy()
123+
# newX[:, 1] = newX[:, 0]
124+
# gamma = np.zeros(n_features)
125+
# gamma[0] = gamma[1] = 1.
126+
# newy = np.dot(newX, gamma)
127+
# with warnings.catch_warnings(record=True) as w:
128+
# warnings.simplefilter('always')
129+
# orthogonal_mp(newX, newy, 2)
130+
# assert len(w) == 1

0 commit comments

Comments
 (0)