# OffsetArrays, inbounds, and confusion

**URL:** <https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295>\
**Category:** Internals & Design\
**Tags:** indexing, arrays\
**Created:** [May 19, 2022, 3:50am UTC](https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295 "2022-05-19T03:50:46Z")\
**Posts on this page:** 1\
**Showing post:** 50

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [May 20, 2022, 4:49pm UTC](https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295/50 "2022-05-20T16:49:41Z")

</div>

> [@ederag](#):
>
> as it would fail on “strided” arrays (e.g. arrays stored in compact form, but with only even indices).

This is false. All `AbstractArray` subtypes must have `AbstractUnitRange` axes — even those with nontraditional indexing. [Interfaces · The Julia Language](https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-array)

Your **memory** can be strided, but the **indices** in Julia must be contiguous.

---

_[View the full topic](https://discourse.julialang.org/t/offsetarrays-inbounds-and-confusion/81295)._
