This kind of works for your example. julia> [Number[1:3] float([1:3])] 3x2 Array{Number,2}: 1 1.0 2 2.0 3 3.0
Ivar kl. 10:39:15 UTC+2 tirsdag 1. april 2014 skrev harven følgende: > > When I build a matrix from columns using vcat, the type of the columns is > sometimes modified, e.g. > > julia> [[1:3] float([1:3])] > 3x2 Array{Float64,2}: > 1.0 1.0 > 2.0 2.0 > 3.0 3.0 > > Here the first column of integers has been converted to float. How can I > prevent this conversion so as to obtain > 3x2 Array{Any,2}: # or Array{Real,2} since Real is the join type here > 1 1.0 > 2 2.0 > 3 3.0 > > I don't care about the type of the resulting array. The point here is not > losing the information concerning the types of the columns. Sincerely, > >