Skip to content

Commit

Permalink
update, support latest numpy, update readme and add version info
Browse files Browse the repository at this point in the history
  • Loading branch information
samson-wang committed Nov 16, 2023
1 parent 17a9209 commit a36abfa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions src/cython_bbox.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a36abfa

Please sign in to comment.