Thank you very much Yichao ! This explain all the problems I have... But it
still unclear :
I cannot create an empty 1D array and resize it :
julia> b = Array[]
0-element Array{Array{T,N},1}
julia> b = Array[]
0-element Array{Array{T,N},1}
julia> reshape(b,2,2)
ERROR: DimensionMismatch("new dimensions (2,2) must be consistent with
array size 0")
in reshape at array.jl:146
in reshape at abstractarray.jl:215
if I create a non empty 2D array I still have problems to append values to
it :
julia> b = [1 2; 3 4]
2x2 Array{Int64,2}:
1 2
3 4
julia> push!(b,[5,6])
ERROR: MethodError: `push!` has no method matching push!(::Array{Int64,2},
::Array{Int64,1})
julia> append!(b,[5,6])
ERROR: MethodError: `append!` has no method matching append!(::Array{Int64,2
}, ::Array{Int64,1})
even if possible, the values 1234 used to create the array will create
mistakes in my calculations ;)
The only possibility I found is to create a non empty 1D array :
julia> c = [1 2 3 4]
1x4 Array{Int64,2}:
1 2 3 4
An then reshape it :
julia> reshape(c,2,2)
2x2 Array{Int64,2}:
1 3
2 4
But that means, that the array c cannot grow in size using push!() , is
that true ?