Push into array of arrays does not work when type is specified

Your second code creates an array-of-arrays-of-arrays:

> Array{Array{Int64,1},1}[] |> typeof
Vector{Vector{Vector{Int64}}}

To create array-of-arrays do:

> Vector{Int64}[] |> typeof
Vector{Vector{Int64}}

or

> Vector{Vector{Int64}}() |> typeof
Vector{Vector{Int64}}
5 Likes