Use function repeat:
julia> repeat(a, inner=(1, 2))
2×4 Array{Int64,2}:
1 1 2 2
3 3 4 4
The keyword innerindicates that you want to repeat the elements (not the entire array), but (1,2)indicates that the rows are not repeated, but the columns are duplicated.
source
share