-
Notifications
You must be signed in to change notification settings - Fork 359
Closed
Labels
Description
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:
(ridx, (row_a, row_b)) in Zip(a.rows(), b.rows()).enumerate()
I should get
(0, ([1.0, 0], [2.0, 0]))
(1, ([0, 1.0], [0, 2.0]))
How can I do this efficiently? Also can i do the same thing in parallel (over row indices) ?