Skip to content

Commit

Permalink
clearer comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedbb committed Apr 15, 2019
1 parent fee1258 commit fe74973
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sklearn/metrics/tests/test_pairwise.py
Expand Up @@ -633,8 +633,8 @@ def test_euclidean_distances_sym(dtype, x_array_constr):
(np.float64, 1e-8)])
@pytest.mark.parametrize("dim", [1, 1000000])
def test_euclidean_distances_extreme_values(dtype, s, dim):
# check that euclidean distances is correct where 'fast' method wouldn't be
# on float32 thanks to upcasting and is not on float64.
# check that euclidean distances is correct with float32 input thanks to
# upcasting. On float64 there are still precision issues.
X = np.array([[1.] * dim], dtype=dtype)
Y = np.array([[1. + s] * dim], dtype=dtype)

Expand All @@ -645,7 +645,7 @@ def test_euclidean_distances_extreme_values(dtype, s, dim):
# This is expected to fail for float64 due to lack of precision of the
# fast method of euclidean distances.
with pytest.raises(AssertionError, match='Not equal to tolerance'):
assert_allclose(distances, expected, rtol=(1 - 0.001))
assert_allclose(distances, expected, rtol=(0.99))
else:
assert_allclose(distances, expected, rtol=1e-5)

Expand Down

0 comments on commit fe74973

Please sign in to comment.