Skip to content

Fix NumPy 1.24+ compatibility: replace deprecated np.float#1241

Open
Mr-Neutr0n wants to merge 1 commit into
MVIG-SJTU:masterfrom
Mr-Neutr0n:fix/numpy-deprecation
Open

Fix NumPy 1.24+ compatibility: replace deprecated np.float#1241
Mr-Neutr0n wants to merge 1 commit into
MVIG-SJTU:masterfrom
Mr-Neutr0n:fix/numpy-deprecation

Conversation

@Mr-Neutr0n
Copy link
Copy Markdown

Summary

  • Replace all occurrences of deprecated np.float with np.float64
  • Replace np.int with np.int64 in bbox.py

Changes

Files modified (6 files, 15 occurrences):

  • trackers/tracking/matching.py - 5 occurrences
  • trackers/utils/bbox.py - 2 occurrences (np.float and np.int)
  • trackers/tracker_api.py - 1 occurrence
  • trackers/ReidModels/net_utils.py - 1 occurrence
  • detector/tracker/tracker/multitracker.py - 1 occurrence
  • detector/tracker/tracker/matching.py - 5 occurrences

Background

np.float and np.int were deprecated in NumPy 1.20 and removed in NumPy 1.24. Using these aliases now raises AttributeError.

Test plan

  • Verified all deprecated usages are replaced
  • Used np.float64 which maintains the same precision as the original np.float

Fixes #1107

🤖 Generated with Claude Code

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>
@Mr-Neutr0n
Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated numpy.float alias removed in Numpy 1.24

1 participant