-
Couldn't load subscription status.
- Fork 128
How to create a PyArray4? #403
Unanswered
BrosnanYuen
asked this question in
Q&A
-
How do you create a numpy::array::PyArray4 from rust vectors?
There isn't a from_vec4 function
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
While the from_vec* are convenient, they are also a relatively inefficient way to construct n-dimensional vectors and hence we do only provide them for low-dimensionality cases and mainly for testing and experimentation.
In general and in particular for the high-dimensionality cases, the intended way to produce an ndarray::Array and then convert this into a PyArray using e.g. the IntoPyArray trait.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment