No-copy version of PyReverseDims for NumPy to Julia arrays
- Dominant language
- Julia
- Stars
- 1.5k
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if there was an equivalent of `PyReverseDims` for the other direction, e.g. a method that takes a `PyArray` and returns a regular Julia Array with the dimensions inverted. For things like images from PIL, the numpy array of size `(nvertical, nhorizontal, ncolor)` mostly comes from NumPy arrays being row-major. In Julia, an array of size `(ncolor, nhorizontal, nvertical)` also feels natural because Julia is column-major. These two arrays would have the same representation in memory, but I cannot figure out how to accomplish this conversion without copying the underlying data, even when using `reinterpret` or `resize`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.