Segmentation Fault with numpy `1.25.2` arrays when using conversion methods
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [x] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Describe the issue
Using the latest dev version, build from source, I have a segmentation fault when using `open3d.utility.IntVector` with a numpy array.
I am not using numpy 2.0.0, so it is probably unrelated to other issues being described.
### Steps to reproduce the bug
```python
import numpy as np
from open3d.utility import IntVector
# this works
IntVector([0, 0, 0])
# this leads to segfault
IntVector(np.array([0, 0, 0]))
```
### Error message
Fatal Python error: Segmentation fault
Main thread:
Current thread 0x000072d01d497000 (most recent call first):
File "/tmp/ipykernel_73644/2190508328.py", line 1 in
Restarting kernel...
### Expected behavior
_No response_
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
- Open3D version: 0.18.0+fcf98ee45
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.4.0
```
### Additional information
`DoubleVector`, for example, works:
```python
import numpy as np
from open3d.utility import DoubleVector
DoubleVector(np.array([0, 0, 0.5]))
```
So it might be a problem with IntVector.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.