Skip to content

Commit ac2d29d

Browse files
committed
FIX typo / bug in test_common that ignored the first init parameter.
1 parent b2cf99f commit ac2d29d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sklearn/tests/test_common.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ def test_all_estimators():
111111
assert_equal(len(args), len(defaults))
112112
else:
113113
continue
114-
for arg, default in zip(args[1:], defaults[1:]):
115-
assert_equal(params[arg], default)
114+
for arg, default in zip(args, defaults):
115+
if isinstance(params[arg], np.ndarray):
116+
assert_array_equal(params[arg], default)
117+
else:
118+
assert_equal(params[arg], default)
116119

117120

118121
def test_estimators_sparse_data():

0 commit comments

Comments
 (0)