Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated np.int with int #9307

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 6, 2022

Per

/content/yolov5/utils/dataloaders.py:458: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR tweaks data type usage in the YOLOv5 data loaders.

πŸ“Š Key Changes

  • Changed usage of np.int to the more generic int type in various parts of the code.
  • Adjusted array type casting to use the built-in int rather than np.int.

🎯 Purpose & Impact

  • πŸ› οΈ Uniformity: Ensures consistent use of data types across the codebase.
  • πŸš€ Performance: May offer slight performance improvements or compatibility benefits.
  • 🀝 Compatibility: Aligns data type usage with standard Python types, potentially improving interaction with other libraries or Python versions.

Overall, users can expect the data loading process to follow consistent type-casting practices with potentially minor performance or compatibility gains.

Per 
```
/content/yolov5/utils/dataloaders.py:458: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
```

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher self-assigned this Sep 6, 2022
@glenn-jocher glenn-jocher merged commit 5a134e0 into master Sep 7, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch September 7, 2022 07:11
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Per 
```
/content/yolov5/utils/dataloaders.py:458: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
```

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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.

None yet

1 participant