Is your custom object `<: AbstractArray`?  Are you on 0.3 or a recent 
0.4-dev?  Are you implementing custom `setindex!` methods?  I don't think 
that your workaround should be necessary, but you haven't posted enough 
context for me to fully appreciate the issue.

As far as support for Array{Array}s, it's definitely a gradual work in 
progress.  Transposition, for example, does work in some cases.  The 
difficulty comes from the fact that it assumes that transposing the 
elements won't change their type, which isn't true for Array{Vector}:

julia> A = Array[[1,2], [3,4], [5,6], [7,8]]
4-element Array{Array{T,N},1}:
 [1,2]
 [3,4]
 [5,6]
 [7,8]

julia> A'
1x4 Array{Array{T,N},2}:
 1x2 Array{Int64,2}:
 1  2  …  1x2 Array{Int64,2}:
 7  8


On Wednesday, July 29, 2015 at 9:56:45 AM UTC-4, Linus Härenstam-Nielsen 
wrote:
>
> I haven't found a solution that works perfectly yet but I circumvented the 
> problem by making a check for colons:
>
> rows = inds[1] == Colon() ? (1:sys.ny) : inds[1]
> cols = inds[2] == Colon() ? (1:sys.nu) : inds[2]
>
> Not perfect since it limits you to always have to use exactly 2 
> incidences, but it works in my case. 
>
> Maybe the handling of Array{Vector} should be looked at, seems to me that 
> there are quiet a few cases where you run into problems with that datatype. 
> For example, I don't think there is a built in way to transpose an 
> Array{Vector, N>1}.
>

Reply via email to