SubArray is not AbstractArray


#1

I was trying to fit a SubArray into a field of AbstractArray type and was surprised by this. I thought most, if not all, array types should be AbstractArray’s… Any reason why not?

julia> SubArray isa AbstractArray
false

#2

I think you want/need SubArray <: AbstractArray instead.

I think of x isa T as translating to typeof(x) <: T.