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

Skip to content

Commit b5b6083

Browse files
committed
simpler test
1 parent c01d3dc commit b5b6083

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sklearn/preprocessing/tests/test_discretization.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,13 @@ def test_ignored_invalid():
144144

145145

146146
@pytest.mark.parametrize('strategy', ['uniform', 'kmeans', 'quantile'])
147-
@pytest.mark.parametrize('n_bins', [2, 3])
148-
def test_same_min_max(strategy, n_bins):
147+
def test_same_min_max(strategy):
149148
warnings.simplefilter("always")
150149
X = np.array([[1, -2],
151150
[1, -1],
152151
[1, 0],
153152
[1, 1]])
154-
est = KBinsDiscretizer(strategy=strategy, n_bins=n_bins, encode='ordinal')
153+
est = KBinsDiscretizer(strategy=strategy, n_bins=3, encode='ordinal')
155154
assert_warns_message(UserWarning,
156155
"Feature 0 is constant and will be replaced "
157156
"with 0.", est.fit, X)

0 commit comments

Comments
 (0)