I'm new to Julia, and I wanted to learn how to do an array comprehension. I have this lines of code:
for i in 1:m
for j in 1:n
arr[i, j] = i + j
end
end
I want to do the same thing with an array comprehension. I wrote this the below code, but I know this is not an array comprehension. Please help me create an array comprehension.
for i in 1:m, j in 1:n
arr[i, j] = i + j
end
Thank you so much!