Fix NumPy 1.24+ compatibility: replace deprecated np.float#1241
Open
Mr-Neutr0n wants to merge 1 commit into
Open
Fix NumPy 1.24+ compatibility: replace deprecated np.float#1241Mr-Neutr0n wants to merge 1 commit into
Mr-Neutr0n wants to merge 1 commit into
Conversation
Replace all occurrences of deprecated np.float with np.float64 and np.int with np.int64 across tracker files. np.float and np.int were deprecated in NumPy 1.20 and removed in NumPy 1.24. Fixes MVIG-SJTU#1107 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
hey, just wanted to see if this could get a look. numpy 1.24 removed np.float and a few other aliases, and this fixes those deprecations. happy to tweak if needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
np.floatwithnp.float64np.intwithnp.int64in bbox.pyChanges
Files modified (6 files, 15 occurrences):
trackers/tracking/matching.py- 5 occurrencestrackers/utils/bbox.py- 2 occurrences (np.float and np.int)trackers/tracker_api.py- 1 occurrencetrackers/ReidModels/net_utils.py- 1 occurrencedetector/tracker/tracker/multitracker.py- 1 occurrencedetector/tracker/tracker/matching.py- 5 occurrencesBackground
np.floatandnp.intwere deprecated in NumPy 1.20 and removed in NumPy 1.24. Using these aliases now raisesAttributeError.Test plan
np.float64which maintains the same precision as the originalnp.floatFixes #1107
🤖 Generated with Claude Code