thanks Islam! I had tried to use the vcat and did't get the result I wanted, but I didn't think of using the splats.
On Fri, Jun 10, 2016 at 11:01 AM, Islam Badreldin <[email protected] > wrote: > Hi Lewis > > Please see below > > > On Friday, June 10, 2016 at 12:48:57 PM UTC-4, Lewis Lehe wrote: > >> Hi I I wondered if there is a neat in Julia way to create a >> multi-dimensional array from an array of arrays. This would be useful for >> creating data structures programatically. >> >> For example... >> >> arr = map(x->[0 1 2 3],1:8) >> >> now i have this array of arrays. but what I would really like is to make >> the entries into the rows of an 8x4 matrix. >> >> Is there a simple way to do this? >> > > As Tim pointed out, cat and friends are the answer. For your > specific examples, this works for me (using ... for splat): > > > vcat(arr...) > 8x4 Array{Int64,2}: > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > 0 1 2 3 > > > Cheers, > Islam >
