daavoo / daavoo/pyntcloud

Not supported in Numpy >= 2.0

Open
#362 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.5k
Forks
229
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I cannot run .plot() using numpy >= 2.0. If I downgrade numpy, it will change all of my codes. Please help me.

**To Reproduce**
Steps to reproduce the behavior:
1. When I plot my obj
obj.plot()

2. Show this error
[/usr/local/lib/python3.11/dist-packages/pyntcloud/plot/matplotlib_backend.py](https://localhost:8080/#) in plot_with_matplotlib(cloud, **kwargs)
23 colors = get_colors(cloud, kwargs["use_as_color"], kwargs["cmap"])
24
---> 25
26 ptp = np.ptp(cloud.xyz)
27

AttributeError: `ptp` was removed from the ndarray class in NumPy 2.0. Use np.ptp(arr, ...) instead.

**Expected behavior**
I want to show my object

**Screenshots**
![Image](https://github.com/user-attachments/assets/95373932-bd4e-4f97-b3d7-1c0d016f4765)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.