`numpy.asarray` for `open3d.core.Tensor` converts the `Tensor` to `np.ndarray` of "scalar" `Tensor`s
- 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](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Describe the issue
I would expect `numpy.asarray` to work on `open3d.core.Tensor` the same way as the `open3d.core.Tensor.numpy` method.
However it converts the `Tensor` to an `np.ndarray` of `open3d.core.Tensor`s with single values.
### Steps to reproduce the bug
```python
import numpy as np
import open3d as o3d
foo_array = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)
foo_tensor = o3d.core.Tensor(foo_array)
fubar_array = np.asarray(foo_tensor)
print(fubar_array)
print(fubar_array.dtype) # object
print(type(fubar_array[0][0])) #
print(fubar_array[0][0]) # 1.0 \n Tensor[shape={}, stride={}, Float32, CPU:0, 0xsomememoryaddress]
```
### Expected behavior
using the code above
```python
print(fubar_array) # [[1. 2. 3.] \n [4. 5. 6.]]
print(fubar_array.dtype) # float32
print(type(fubar_array[0][0])) #
print(fubar_array[0][0]) # 1.0
```
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: `3.10.8 (main, Nov 1 2022, 14:18:21) [GCC 12.2.0]`
- Open3D version: `0.16.0`
- System architecture: `x86`
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.