Skip to content

Commit bb141c6

Browse files
committed
Fix issue with NumPy uninitialized memory
1 parent df0aa1c commit bb141c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chamois/predictor/information.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def information_accretion(
4040
tot = _Y.shape[0]
4141
if tot > 0 and pos > 0:
4242
freq[i] = pos / tot
43-
return -numpy.log2(freq, where=freq != 0.0)
43+
return -numpy.log2(freq, where=freq != 0.0, out=numpy.zeros_like(freq))
4444

4545

4646
def remaining_uncertainty_score(y_true, y_pred, information_accretion):

0 commit comments

Comments
 (0)