Hi together,
It seems to be quite natural to try converting Vector{Vector{T}} into
Matrix{T} or vice versa. Is this conversion problematic in some way? What
would be an efficient way to achieve it?
As a first attempt I would do
y = [[i,i] for i=1:3]
mat = Array(eltype(y[1]),length(y),length(y[1]))
for i=1:length(y)
mat[i,:] = y[i]
end
to get the matrix. And
v = vcat(Vector{eltype(mat[1,1])}[mat[i,:][:] for i=1:size(mat,1)])
I am sure there are more elegant ways of doing this.
Thanks!
- Alex.
