Re: [julia-users] How to insert new row/ egsisitng vector into array ?
The main reason is actually that it's quite hard and, at best, very inefficient to do this in general. You have to move the elements of the entire array except in the very special case that you happen to be appending to the "good" dimension of an array. On Sun, Jun 28, 2015 at 4:13 AM, Ivar Nesje wrote: > No, > array size for Array{T, N} where N > 1 is immutable. > > I think I have read somewhere that this is to make it easier to have > automatic bounds check hoisting in loop, but I don't think we have that > yet.
[julia-users] How to insert new row/ egsisitng vector into array ?
No, array size for Array{T, N} where N > 1 is immutable. I think I have read somewhere that this is to make it easier to have automatic bounds check hoisting in loop, but I don't think we have that yet.
[julia-users] How to insert new row/ egsisitng vector into array ?
Is posible insert new row (egsisitng vector) into array ? wihout hcat etc. ? Is something like insert! in iter ? julia> a=rand(5,5) 5x5 Array{Float64,2}: 0.613346 0.864493 0.495873 0.571237 0.948809 0.688794 0.168175 0.732427 0.0516122 0.439683 0.740090.491623 0.0662683 0.160219 0.708842 0.0678776 0.601627 0.425847 0.329719 0.108245 0.689865 0.233258 0.171292 0.487139 0.452603 julia> insert!(a,3,1,zeros(5)) ERROR: `insert!` has no method matching insert!(::Array{Float64,2}, ::Int32, ::Int32, ::Array{Float64,1}) julia> insert!(a,[:,3],,zeros(5)) ERROR: syntax: unexpected , Paul?