Zip indexed rows from 2d arrays #996
Answered
by
bluss
vikigenius
asked this question in
Q&A
-
Say, I have two Array2 objects: type M = Array2<f32>;
let mut a = M::eye(2);
let mut b = 2.0 * a; I want to iterate over the rows of a and b in lockstep, but also have the row index simultaneously: for example:
How can I do this efficiently? Also can i do the same thing in parallel (over row indices) ? |
Beta Was this translation helpful? Give feedback.
Answered by
bluss
May 9, 2021
Replies: 1 comment 2 replies
-
Zip::indexed can do this |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
vikigenius
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zip::indexed can do this