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

numpy v1.24 bug #632

Closed
Dead-Hand opened this issue Jul 17, 2023 · 1 comment
Closed

numpy v1.24 bug #632

Dead-Hand opened this issue Jul 17, 2023 · 1 comment
Labels
bug Something isn't working compile User has trouble compiling on their own platform.

Comments

@Dead-Hand
Copy link

I am trying to run the kalibr_calibrate_cameras script in a python3 environment using numpy version 1.24.3, but I get the following error:

Traceback (most recent call last):
  File "kalibr_calibrate_cameras", line 465, in <module>
    main()
  File "kalibr_calibrate_cameras", line 286, in main
    kcc.printParameters(calibrator)
  File "/home/user/ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraUtils.py", line 662, in printParameters
    me, se = getReprojectionErrorStatistics(rerrs)
  File "/home/user/ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraUtils.py", line 123, in getReprojectionErrorStatistics
    mean = np.mean(rerr_matrix, 0, dtype=np.float)
  File "/home/user/venv/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

This prevents me from successfully running the script. I can revert to an older numpy version than 1.20, but moving forward it sounds like this will be a bug if you ever jump to a newer version of numpy (at least newer than 1.20, from the looks of it).

@Dead-Hand
Copy link
Author

Found an existing pull request #597 that would fix this if merged

@goldbattle goldbattle added bug Something isn't working compile User has trouble compiling on their own platform. labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compile User has trouble compiling on their own platform.
Projects
None yet
Development

No branches or pull requests

2 participants