Skip to content

Commit 44351e5

Browse files
committed
merge with developMerge branch 'develop' into 323-fix_bin_size_with_sample_weight
2 parents f363693 + da450a1 commit 44351e5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

optbinning/binning/continuous_binning.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ def _prebinning_refinement(self, splits_prebinning, x, y, y_missing,
903903
def _compute_prebins(self, splits_prebinning, x, y, sw):
904904
n_splits = len(splits_prebinning)
905905
if not n_splits:
906-
return splits_prebinning, np.array([]), np.array([])
906+
return (splits_prebinning, np.array([]), np.array([]), np.array([]),
907+
np.array([]), np.array([]), np.array([]), np.array([]))
907908

908909
if self.dtype == "categorical" and self.user_splits is not None:
909910
indices = np.digitize(x, splits_prebinning, right=True)

tests/test_binning_piecewise.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ def test_default_discontinuous():
188188
optb.fit(x, y)
189189

190190
optb.binning_table.build()
191-
assert optb.binning_table.iv == approx(5.84465825, rel=1e-6)
192-
191+
assert optb.binning_table.iv == approx(5.84465825, rel=1e-4)
193192

194193
def test_bounds_transform():
195194
optb = OptimalPWBinning(name=variable)

0 commit comments

Comments
 (0)