Skip to content

Commit

Permalink
fix(Evaluation): updated deprecated np.int to np.int8 for boolean to …
Browse files Browse the repository at this point in the history
…integer matrix conversion
  • Loading branch information
muellerdo committed Dec 20, 2022
1 parent 973ff46 commit 8f1a2e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aucmedi/evaluation/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def compute_metrics(preds, labels, n_labels, threshold=None):
truth = labels[:, c]
if threshold is None:
pred_argmax = np.argmax(preds, axis=-1)
pred = (pred_argmax == c).astype(np.int)
pred = (pred_argmax == c).astype(np.int8)
else:
pred = np.where(preds[:, c] >= threshold, 1, 0)
# Obtain prediction confidence (probability)
Expand Down

0 comments on commit 8f1a2e8

Please sign in to comment.