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

Skip to content

Commit 5b2aba1

Browse files
artsobolevamueller
authored andcommitted
1 parent cad1ac1 commit 5b2aba1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sklearn/linear_model/tests/test_sgd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def test_weights_multiplied(self):
630630
clf1.fit(X4, Y4, sample_weight=sample_weights)
631631
clf2.fit(X4, Y4, sample_weight=multiplied_together)
632632

633-
assert_array_equal(clf1.coef_, clf2.coef_)
633+
assert_almost_equal(clf1.coef_, clf2.coef_)
634634

635635
def test_auto_weight(self):
636636
"""Test class weights for imbalanced data"""

sklearn/neighbors/tests/test_approximate.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,16 @@ def test_sparse_input():
471471

472472
d_sparse, i_sparse = forest_sparse.kneighbors(X2, return_distance=True)
473473
d_dense, i_dense = forest_dense.kneighbors(X2.A, return_distance=True)
474-
assert_array_equal(d_sparse, d_dense)
475-
assert_array_equal(i_sparse, i_dense)
474+
475+
assert_almost_equal(d_sparse, d_dense)
476+
assert_almost_equal(i_sparse, i_dense)
476477

477478
d_sparse, i_sparse = forest_sparse.radius_neighbors(X2,
478479
return_distance=True)
479480
d_dense, i_dense = forest_dense.radius_neighbors(X2.A,
480481
return_distance=True)
481482
assert_equal(d_sparse.shape, d_dense.shape)
482483
for a, b in zip(d_sparse, d_dense):
483-
assert_array_equal(a, b)
484+
assert_almost_equal(a, b)
484485
for a, b in zip(i_sparse, i_dense):
485-
assert_array_equal(a, b)
486+
assert_almost_equal(a, b)

0 commit comments

Comments
 (0)