julia> Vector[rand(3), rand(3), rand(3)]
3-element Array{Array{T,1},1}:
 [0.08082297930289717,0.4831571293164978,0.7227686419871842]
 [0.7376841239302636,0.6150435898281146,0.1474762464521686]
 [0.9699744293150396,0.19770809574045556,0.638619038137211]

julia> hcat(ans...)
3x3 Array{Float64,2}:
 0.080823  0.737684  0.969974
 0.483157  0.615044  0.197708
 0.722769  0.147476  0.638619

However, if you are worried about performance then creating an array of
the right size and filling it in a loop might be better.

On Tue, 2016-06-28 at 10:03, Ferran Mazzanti <ferran.mazza...@gmail.com> wrote:
> Hi,
>
> probably simple question but can't find the answer. I have a vector of
> vectors like this one
>
> chi2_mods
>
> 3-element Array{Array{Float64,1},1}:
>  
> [7245.87,7242.98,7240.08,7237.18,7234.28,7231.39,7228.49,7225.59,7222.7,7219.81
>   …  
> 0.0299669,0.0251945,0.0206114,0.0162815,0.0130703,0.00927407,0.00593044,0.00316051,0.00113046,0.000142875]
>  
> [8102.2,8098.96,8095.72,8092.48,8089.24,8086.0,8082.77,8079.53,8076.29,8073.06
>   …  
> 0.0328972,0.0278708,0.0229661,0.0182674,0.0138605,0.00983647,0.00629811,0.00337032,0.0211399,0.00047848]
>  
> [9271.31,9267.61,9263.9,9260.2,9256.49,9252.79,9249.09,9245.38,9241.68,9237.98
>   …  
> 3.35423,2.67496,2.06886,1.53737,1.08184,0.703655,1.04465,0.487041,0.133205,0.000404423]
>
>
> and would like to reshape it into an array -not copy but reshape. Notice
> that all vectors have the same length so no problems with that.
> Is this possible?
>
> Thanks in advance,
>
> Ferran.

Reply via email to