I'm implementing a setindex! method for an object with a field of type 
Matrix{Vector{Float64}} (a matrix of vectors) and I've run into a problem 
with getting the Colon() index to work properly. It comes down to this:

julia> A = Array(Vector{Int}, 1)
1-element Array{Array{Int64,1},1}:
 #undef

julia> A[:] = [1,2,3]
ERROR: DimensionMismatch("tried to assign 3 elements to 1 destinations")
 in throw_setindex_mismatch at operators.jl:226

Since the element I'm trying to assign is a vector setindex! calls the 
wrong method for my purposes. What I would like is for the resulting array 
to be:

julia> A
1-element Array{Array{Int64,1},1}:
 [1,2,3]

Is there a way to get around this? I would change the datatype to 
Array{Float64, 3} if I could but other functions rely on the current 
structure.

Reply via email to