Skip to content

fix: numpy float deprectation#32

Open
Sjouks wants to merge 1 commit intoeric-wieser:masterfrom
Sjouks:fix/numpy_float_deprecation
Open

fix: numpy float deprectation#32
Sjouks wants to merge 1 commit intoeric-wieser:masterfrom
Sjouks:fix/numpy_float_deprecation

Conversation

@Sjouks
Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown

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

@juliangaal
Copy link
Copy Markdown

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
Copy Markdown

cjue commented Mar 15, 2024

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

@belalhmedan90
Copy link
Copy Markdown

@gstavrinos is it possible please to merge this PR?

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.

6 participants