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

Skip to content

Commit c3f4483

Browse files
qinhanmin2014raghavrv
authored andcommitted
[MRG+1] reduce decimal restriction in test_singular_values to avoid non-deterministic test failure (#9162)
* reduce decimal restriction * change restriction
1 parent 87b3165 commit c3f4483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/decomposition/tests/test_pca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def test_singular_values():
272272
assert_array_almost_equal(np.sum(pca.singular_values_**2.0),
273273
np.linalg.norm(X_pca, "fro")**2.0, 12)
274274
assert_array_almost_equal(np.sum(apca.singular_values_**2.0),
275-
np.linalg.norm(X_apca, "fro")**2.0, 12)
275+
np.linalg.norm(X_apca, "fro")**2.0, 9)
276276
assert_array_almost_equal(np.sum(rpca.singular_values_**2.0),
277277
np.linalg.norm(X_rpca, "fro")**2.0, 0)
278278

0 commit comments

Comments
 (0)