Skip to content

Commit

Permalink
Merge pull request #258 from argoai/numpy-deprecation-fix
Browse files Browse the repository at this point in the history
Update for deprecated types.
  • Loading branch information
benjaminrwilson authored Jul 26, 2021
2 parents e728aa5 + cea9b92 commit 5860c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions argoverse/evaluation/detection/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ def calc_ap(gt_ranked: np.ndarray, recalls_interp: np.ndarray, ninst: int) -> Tu
"""
tp = gt_ranked

cumulative_tp = np.cumsum(tp, dtype=np.int)
cumulative_fp = np.cumsum(~tp, dtype=np.int)
cumulative_tp = np.cumsum(tp, dtype=int)
cumulative_fp = np.cumsum(~tp, dtype=int)
cumulative_fn = ninst - cumulative_tp

precisions = cumulative_tp / (cumulative_tp + cumulative_fp + np.finfo(float).eps)
Expand Down
2 changes: 1 addition & 1 deletion argoverse/utils/make_att_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def save_bev_img(
)
cv2.line(img, p1, p2, color=color)

kernel = np.ones((5, 5), np.float)
kernel = np.ones((5, 5), float)
img = cv2.dilate(img, kernel, iterations=1)
cv2.putText(
img,
Expand Down

0 comments on commit 5860c79

Please sign in to comment.