8000 TST Add additional constant features · scikit-learn/scikit-learn@e02f957 · GitHub
[go: up one dir, main page]

Skip to content

Commit e02f957

Browse files
author
Guillaume Lemaitre
committed
TST Add additional constant features
1 parent b8f8055 commit e02f957

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/tree/tests/test_tree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,8 @@ def test_only_constant_features():
11871187

11881188

11891189
def test_behaviour_constant_feature_after_splits():
1190-
X = np.transpose([[0, 0, 0, 0, 0, 1, 2, 4, 5, 6, 7]])
1190+
X = np.transpose(np.vstack(([[0, 0, 0, 0, 0, 1, 2, 4, 5, 6, 7]],
1191+
np.zeros((4, 11)))))
11911192
y = [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3]
11921193
for name, TreeEstimator in ALL_TREES.items():
11931194
est = TreeEstimator(random_state=0, max_features=1)

0 commit comments

Comments
 (0)
0