We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8a35c5 commit 6fc68e2Copy full SHA for 6fc68e2
src/copairs/compute.py
@@ -398,7 +398,8 @@ def ap_contiguous(
398
pr_k = tp / k
399
400
# Calculate average precision scores for each profile
401
- ap_scores = np.add.reduceat(pr_k * rel_k_list, cutoffs) / num_pos
+ with np.errstate(divide="ignore", invalid="ignore"):
402
+ ap_scores = np.add.reduceat(pr_k * rel_k_list, cutoffs) / num_pos
403
404
# Generate configurations (number of positive and total pairs)
405
null_confs = np.stack([num_pos, counts], axis=1)
0 commit comments