Skip to content

Commit

Permalink
Reduce precision requirements for float32 PCA (#12825)
Browse files Browse the repository at this point in the history
Fixes #12823
  • Loading branch information
jnothman committed Dec 19, 2018
1 parent a941c2e commit 57e058e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sklearn/decomposition/tests/test_pca.py
Expand Up @@ -723,8 +723,9 @@ def check_pca_float_dtype_preservation(svd_solver):
assert pca_64.transform(X_64).dtype == np.float64
assert pca_32.transform(X_32).dtype == np.float32

# decimal=5 fails on mac with scipy = 1.1.0
assert_array_almost_equal(pca_64.components_, pca_32.components_,
decimal=5)
decimal=4)


def check_pca_int_dtype_upcast_to_double(svd_solver):
Expand Down

0 comments on commit 57e058e

Please sign in to comment.