From e551f21db81343c2ee9489b9f2cd3d3713a1c058 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Tue, 29 Nov 2022 19:29:36 +0330 Subject: [PATCH] Fix the depracated code --- PythonAPI/pycocotools/cocoeval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonAPI/pycocotools/cocoeval.py b/PythonAPI/pycocotools/cocoeval.py index f4e3decb..fe2c81ae 100644 --- a/PythonAPI/pycocotools/cocoeval.py +++ b/PythonAPI/pycocotools/cocoeval.py @@ -375,8 +375,8 @@ def accumulate(self, p = None): tps = np.logical_and( dtm, np.logical_not(dtIg) ) fps = np.logical_and(np.logical_not(dtm), np.logical_not(dtIg) ) - tp_sum = np.cumsum(tps, axis=1).astype(dtype=np.float) - fp_sum = np.cumsum(fps, axis=1).astype(dtype=np.float) + tp_sum = np.cumsum(tps, axis=1).astype(float) + fp_sum = np.cumsum(fps, axis=1).astype(float) for t, (tp, fp) in enumerate(zip(tp_sum, fp_sum)): tp = np.array(tp) fp = np.array(fp)