In general, Julia distinguishes one-dimensional arrays (which are column vectors) from two-dimensional arrays (which are row vectors). hcat and vcat reflect this distinction.
— John On Mar 16, 2014, at 11:50 AM, Elric Erkose <[email protected]> wrote: > Why are the result types of hcat and vcat different? Is this just to > distinguish a column vector (hcat) from a row vector (vcat)? > > julia> hcat(1,2,3) # same as [1 2 3] > 1x3 Array{Int64,2}: > 1 2 3 > > julia> vcat(1,2,3) # same as [1, 2, 3] > 3-element Array{Int64,1}: > 1 > 2 > 3 >
