Recovering MATLAB addict needs help to understand Julia indexing

fill puts the same object in every slot of the array. Instead, you could use an array comprehension to create a new object for each slot:

[[Point2f0(0,0) for _ in 1:2] for _ in 1:2]
7 Likes