# Something weird is going on with \`DenseArray\`

**URL:** <https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156>\
**Category:** General Usage\
**Tags:** array, parametric-types, c\
**Created:** [May 19, 2025, 8:43pm UTC](https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156 "2025-05-19T20:43:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![akriegman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akriegman/32/30573_2.png) [@akriegman](https://discourse.julialang.org/u/akriegman)\
**Post date:** [May 19, 2025, 8:43pm UTC](https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156/1 "2025-05-19T20:43:25Z")

</div>

From base/boot.jl:

```julia
# commented-out definitions are implemented in C

...

#abstract type AbstractArray{T,N} end
#abstract type DenseArray{T,N} <: AbstractArray{T,N} end

...

#mutable struct Array{T,N} <: DenseArray{T,N}
# ref::MemoryRef{T}
# size::NTuple{N,Int}
#end

```

So `Array` should be a subtype of `DenseArray`, and `DenseArray` should be abstract, so not a `DataType`. But these are apparently not true:

```julia
julia> Array{Int,3} isa DenseArray{Int,3}
false

julia> Array{Int,3} isa DenseArray
false

julia> Array isa DenseArray
false

julia> typeof(DenseArray{Int,3})
DataType

```

Although `DenseArray` and `DenseArray{Int,3}` have no constructor methods, as we would expect from an abstract type.

Is this a bug, or is there something I’m missing here?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [May 19, 2025, 8:48pm UTC](https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156/2 "2025-05-19T20:48:11Z")

</div>

`isa` and `<:` aren’t the same thing.

```julia
julia> Array{Int, 3} <: DenseArray{Int,3}
true

```

---

<div class="post-metadata">

**Author:** ![akriegman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akriegman/32/30573_2.png) [@akriegman](https://discourse.julialang.org/u/akriegman)\
**Post date:** [May 19, 2025, 8:49pm UTC](https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156/3 "2025-05-19T20:49:09Z")

</div>

oh my god you’re right I’m just being dumb. and apparently DataTypes can be abstract too. I’m just gonna delete this.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [May 19, 2025, 11:24pm UTC](https://discourse.julialang.org/t/something-weird-is-going-on-with-densearray/129156/4 "2025-05-19T23:24:22Z")

</div>

> [@akriegman](#):
>
> Although `DenseArray` and `DenseArray{Int,3}` have no constructor methods, as we would expect from an abstract type.

FYI, the fact that abstract types usually don’t have (constructor) methods is purely a matter of style/convention. And some abstract types, like `AbstractFloat`, do have methods.
