open-mmlab / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
46 stars 34 forks source link

replace np.float with float as it's deprecated since numpy 1.20.0 #29

Open hubutui opened 1 year ago

hubutui commented 1 year ago

https://github.com/open-mmlab/cocoapi/blob/01f805cd54d7bd7af64c0fbd5fd96d8ca0b9ddc9/lvis/lvis/eval.py#L357-L358

As descriped at upstream:

np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself.

see also https://github.com/lvis-dataset/lvis-api/issues/37

hubutui commented 1 year ago

https://github.com/open-mmlab/cocoapi/blob/01f805cd54d7bd7af64c0fbd5fd96d8ca0b9ddc9/pycocotools/pycocotools/cocoeval.py#L410-L411

These lines also need updating.