Skip to content

Commit d769f81

Browse files
authored
Merge pull request #2924 from ales-erjavec/fixes/contingency-outoff-bounds
[FIX] contingency.pyx: Fix out of bound write
2 parents c6511b6 + 30cada3 commit d769f81

File tree

5 files changed

+2649
-935
lines changed

5 files changed

+2649
-935
lines changed

Orange/classification/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def find_new_selectors(self, X, Y, W, domain, existing_selectors):
559559
@staticmethod
560560
def discretize(X, Y, W, domain):
561561
values, counts, _ = _contingency.contingency_floatarray(
562-
X, Y.astype(dtype=np.int8), len(domain.class_var.values), W)
562+
X, Y.astype(dtype=np.intp), len(domain.class_var.values), W)
563563
cut_ind = np.array(EntropyMDL._entropy_discretize_sorted(counts.T, True))
564564
return [values[smh] for smh in cut_ind]
565565

0 commit comments

Comments
 (0)