From a36abfa456ef6d5e7a5363abe280b24f5f30e6ad Mon Sep 17 00:00:00 2001 From: samson Date: Thu, 16 Nov 2023 17:31:14 +0800 Subject: [PATCH] update, support latest numpy, update readme and add version info --- README.md | 9 +++++++-- setup.py | 2 +- src/cython_bbox.pyx | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5bc95c2..f7095d4 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,14 @@ pip install cython_bbox ``` from cython_bbox import bbox_overlaps +import numpy as np + +gt = np.random.random((5, 4)) +dt = np.random.random((10, 4)) + overlaps = bbox_overlaps( - np.ascontiguousarray(dt, dtype=np.float32), - np.ascontiguousarray(gt, dtype=np.float32) + np.ascontiguousarray(dt, dtype=np.float), + np.ascontiguousarray(gt, dtype=np.float) ) ``` diff --git a/setup.py b/setup.py index ab19ea9..678f3b7 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ def finalize_options(self): install_requires=["Cython","numpy"], ext_modules=ext_modules, cmdclass={'build': build}, - version = '0.1.3', + version = '0.1.5', description = 'Standalone cython_bbox', long_description=long_description, long_description_content_type="text/markdown", diff --git a/src/cython_bbox.pyx b/src/cython_bbox.pyx index e14780d..18ffab8 100644 --- a/src/cython_bbox.pyx +++ b/src/cython_bbox.pyx @@ -9,8 +9,10 @@ cimport cython import numpy as np cimport numpy as np -DTYPE = np.float -ctypedef np.float_t DTYPE_t +DTYPE = float +ctypedef np.float64_t DTYPE_t + +__version__ = "0.1.5" def bbox_overlaps( np.ndarray[DTYPE_t, ndim=2] boxes,