Ugly workaround: julia> [Array(Any,3,0) [1:3] float([1:3])] 3x2 Array{Any,2}: 1 1.0 2 2.0 3 3.0
Den tisdagen den 1:e april 2014 kl. 10:39:15 UTC+2 skrev harven: > > 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, > >