Here is rookie question, which I have tried to find a similar question and 
answer in the history of this group, but failed. Please bear me.

Since Julia distinguishes between Array{Float64,1} and Array{Float64,2}, 
even there is only one column in an Array{Float64,2}. Therefore, the type 
of rand(5) and rand(5,1) are not same.

julia> x = rand(5)
5-element Array{Float64,1}:
 0.183247
 0.480208
 0.623144
 0.342792
 0.0400695

julia> y = rand(5, 1)
5x1 Array{Float64,2}:
 0.553224
 0.0061835
 0.762059
 0.643796
 0.655135


Is there any way that I can upgrade x about to become an Array{Float64,2}? 
And is there a way to downgrade y to become an Array{Float64,1}, when it 
has only one column?

In case that there is a similar discussion before, a link to the previous 
thread is good enough and appreciated!

Thanks!

Reply via email to