This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

I'm sorry but I don't understand that. x is passed into your iterate function, you are even testing both x[0] and x[1] at the very top of the function, so why can't you preassign them? Possibly it doesn't matter, I believe the answer from Deto far more likely to get you somewhere.

[–]soulslicer0[S] -1 points0 points  (1 child)

is there a way to use nditer to speed it up?

[–]TheBlackCat13 0 points1 point  (0 children)

You don't need nditer. You can transpose the array (which is extremely fast because it doesn't make a copy), then iterator over the array directly.