We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b53fc3 commit 246795fCopy full SHA for 246795f
1 file changed
sklearn/linear_model/tests/test_sgd.py
@@ -1499,12 +1499,11 @@ def test_partial_fit_oneclass(klass):
1499
assert clf.coef_.shape == (X.shape[1], )
1500
assert clf.offset_.shape == (1,)
1501
assert clf.predict([[0, 0]]).shape == (1, )
1502
- id1 = id(clf.coef_.data)
+ previous_coefs = clf.coef_
1503
1504
clf.partial_fit(X[third:])
1505
- id2 = id(clf.coef_.data)
1506
# check that coef_ haven't been re-allocated
1507
- assert id1 == id2
+ assert clf.coef_ is previous_coefs
1508
1509
# raises ValueError if number of features does not match previous data
1510
with pytest.raises(ValueError):
0 commit comments