Array{Int64, 1} is an array of Ints. Type{Int64} is the type of a type, so
Array{Type{Int64}} is an array of types.
On Friday, October 9, 2015 at 1:11:25 PM UTC-4, Gnimuc Key wrote:
>
> i think `Array{Type{Int64},1}` is a vector whose element type
> is constrained to `Int64`, but i'm confused by the outputs of the code
> below:
>
>
> julia> a = Array{Type{Int64}}(2)
> 2-element Array{Type{Int64},1}:
> #undef
> #undef
>
> julia> a[:] = [Int64, Float32]
> 2-element Array{DataType,1}:
> Int64
> Float32
>
> julia> isa(a[2], eltype(a))
> false
>
>
> julia> a
> 2-element Array{Type{Int64},1}:
> Int64
> Float32
>
>
> the last line is so wired.
>