A loop is very clean :-).
This gets more complicated if you wanted to use some kind of library function,
because you have to somehow specify that the tuples (1d objects) are actually
supposed to be thought of as being equivalent to a 1x3 matrix. You could
easily end up having to take transposes somewhere. So why not just write the 5
lines of code it will take to do this using a loop?
--Tim
On Monday, July 06, 2015 01:10:01 PM Júlio Hoffimann wrote:
> Hi,
>
> How to convert:
>
> 1000-element Array{Tuple{Integer,Integer,Integer},1}:
> (10,2,1)
> (5,7,10)
> (5,7,4)
> (1,1,6)
> (2,3,6)
> (8,6,4)
> (10,2,4)
> (1,3,9)
> (9,3,7)
> (5,2,4)
> ⋮
> (1,6,8)
> (4,6,6)
> (3,9,5)
> (10,4,10)
> (8,7,4)
> (4,8,9)
> (2,6,10)
> (3,6,5)
> (1,7,10)
>
> into the corresponding 1000x3 matrix in a "clean fashion"?
>
> -Júlio