Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to create a PyArray4? #403

Unanswered
BrosnanYuen asked this question in Q&A
Discussion options

How do you create a numpy::array::PyArray4 from rust vectors?

There isn't a from_vec4 function

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #402 on November 10, 2023 06:33.

AltStyle によって変換されたページ (->オリジナル) /