Array vs DenseArray?

Hi there!

What’s the difference between DenseArray and Array?

It looks to me as if there were two different types (i.e., not one an alias of the other?), with no difference in the internal representation… :thinking:
Why are both needed?

I have never used DenseArray myself but it looks like it’s a part of the type hierarchy and should be useful for dispatch.

julia> supertype(Array)
DenseArray

julia> subtypes(DenseArray)
6-element Vector{Any}:
 Array
 Base.CodeUnits
 Base.Experimental.Const
 Random.UnsafeView
 SharedArrays.SharedArray
 SuiteSparse.CHOLMOD.Dense
2 Likes

Ah, ok! I didn’t realize it was an abstract type! :+1: