imantha
imantha

Reputation: 3828

Julia get stuck when pushing into two arrays

I am not sure why but when I try to use push! two times (to append values in two different arrays), julia gets stuck. I have tried commenting out one of the push! lines and it executes fine. But with both it just doesn't work.

Any ideas why this maybe?

enter image description here

print(candidates)
# organisation is a similar array

enter image description here

Upvotes: 1

Views: 92

Answers (1)

Vincent Ramdhanie
Vincent Ramdhanie

Reputation: 103135

There is no need for the inner loop. Also, you are using the variable can and org in an ambiguous way.

can = []
org = []

for (c, o) in zip(candidates, organisations)
   push!(can, c)
   push!(org, o)
   
end

Upvotes: 2

Related Questions