It’s not repetition, it’s broadcasting, and your original example is broadcasting down to zero elements. But even if the target is empty, the dimensions must still satisfy the rules for broadcasting.

```
julia> a = zeros(0, 2)
0×2 Array{Float64,2}
julia> a .= ones(1, 1)
0×2 Array{Float64,2}
julia> a .= ones(1, 2)
0×2 Array{Float64,2}
julia> a .= ones(1, 3)
ERROR: DimensionMismatch("array could not be broadcast to match destination")
Stacktrace:
[1] check_broadcast_shape at ./broadcast.jl:509 [inlined]
[2] check_broadcast_shape at ./broadcast.jl:510 [inlined]
[3] check_broadcast_axes at ./broadcast.jl:512 [inlined]
[4] instantiate at ./broadcast.jl:259 [inlined]
[5] materialize!(::Array{Float64,2}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2},Nothing,typeof(identity),Tuple{Array{Float64,2}}}) at ./broadcast.jl:823
[6] top-level scope at none:1
```

Addendum:

If you don’t want the broadcasting behavior, use regular assignment instead of dot assignment.

```
julia> a = zeros(0,1)
0×1 Array{Float64,2}
julia> a[:,1] = [1]
ERROR: DimensionMismatch("tried to assign 1-element array to 0×1 destination")
Stacktrace:
[...]
```