Fix NumPy 1.24+ compatibility: replace deprecated np.float
CLA Signed
## 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 条评论