What is it `a = Array{Int64,1}`?

Hello, what is it a = Array{Int64,1} ?
In Juno I have the output Vector{Int64} and then if I typeof(a) I got DataType, put I can’t extend it, e.g. I can’t push!() over it.

Vector{T} is just an alias for Array{T,1}, i.e. a one-dimensional Array with element type T. When you do

you assign the type Array{Int64,1} to a, and the type of a type is DataType. I suspect you want an empty vector? In that case you have to call the constructor, i.e. a = Vector{Int}(). Note the parens.

1 Like

got it… thank you…