Skip to content

Commit

Permalink
FIX jenkins error on numpy 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller committed May 4, 2013
1 parent 2ffb484 commit 83ed57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sklearn/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,8 @@ def precision_recall_fscore_support(y_true, y_pred, beta=1.0, labels=None,
old_err_settings = np.seterr(divide='ignore', invalid='ignore')

# precision and recall
precision = np.divide(true_pos, true_pos + false_pos, dtype=np.double)
recall = np.divide(true_pos, true_pos + false_neg, dtype=np.double)
precision = np.divide(true_pos.astype(np.float), true_pos + false_pos)
recall = np.divide(true_pos.astype(np.float), true_pos + false_neg)

# handle division by 0 in precision and recall
precision[(true_pos + false_pos) == 0] = 0.0
Expand Down

0 comments on commit 83ed57d

Please sign in to comment.