Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: numpy float deprectation #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sjouks
Copy link

@Sjouks Sjouks commented Jan 2, 2023

Latest numpy release deprecates np.float, see: https://numpy.org/doc/stable/release/1.24.0-notes.html#expired-deprecations

This MR aims to solve this deprecation issue by replacing np.float by np.float32.

Copy link

@DeboBurro DeboBurro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have this issue too. discussed as well in StackOverflow

  File "/root/catkin_ws/install/lib/python3/dist-packages/ros_numpy/point_cloud2.py", line 224, in <module>
    def get_xyz_points(cloud_array, remove_nans=True, dtype=np.float):
  File "/root/.local/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'

The only thing I am not sure about here is that should be float64 or float32?

@SimonCBell
Copy link

We have this issue too. Would be great to get it fixed!

@juliangaal
Copy link

The only thing I am not sure about here is that should be float64 or float32?

To my knowledge, the points in PointCloud2 are of type float, not double, so float32 makes more sense

@cjue
Copy link

cjue commented Mar 15, 2024

Isn't this issues solved since #39 was merged?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants