Looping over subset of array indices: Julia vs Python

Did you try wrapping the loop in a function and then passing your input and output arrays as arguments to that function?

1 Like