Skip to content

Best way to emulate NumPy index arrays #1167

Answered by Tudyx
Tudyx asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks a lot for your proposal! The Bed-Reader seems to be a very interesting project.
For my problem, is solve it using the index_axis method. It's seems to work find for now.

use ndarray::Axis;
// Emulate the NumPy data[index]
data.index_axis(Axis(0), index)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Tudyx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants