facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.3k stars 7.32k forks source link

Fix ValueError: Unable to avoid copy while creating an array as requested (numpy 2.0.0) #5312

Closed stefanklut closed 1 week ago

stefanklut commented 1 week ago

This pull request fixes a ValueError that occurs when creating an array (changed in numpy 2.0.0) The issue is resolved by replacing np.array with np.asarray. As copy was always set to False anyways. See: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword

facebook-github-bot commented 1 week ago

@wat3rBro has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

This pull request has been merged in facebookresearch/detectron2@70f454304e1a38378200459dd2dbca0f0f4a5ab4.