ITADN

Fix NumPy 1.24+ compatibility: replace deprecated np.float

#5645Pull RequestMr-Neutr0n 创建于 2026-02-05
CLA Signed
M
Mr-Neutr0ncommented
## Summary - Replace deprecated NumPy float aliases to support NumPy 1.24+ ## Changes - `fairseq/modules/dynamic_crf_layer.py`: Replace `np.float("inf")` with `float("inf")` - `examples/data2vec/models/mae.py`: Replace `np.float` with `np.float64` ## Background `np.float` was deprecated in NumPy 1.20 and removed in NumPy 1.24. Using `np.float` now raises `AttributeError: module 'numpy' has no attribute 'float'`. ## Test plan - [x] Verified the fix maintains the same behavior - [x] `float("inf")` is the correct way to represent infinity - [x] `np.float64` maintains the same precision as the original `np.float` Fixes #4945 🤖 Generated with [Claude Code](https://claude.com/claude-code)
合并状态:未合并 2 条评论