# Is there a way to reference an arbitrary array-like object as 0-based array?

**URL:** <https://discourse.julialang.org/t/is-there-a-way-to-reference-an-arbitrary-array-like-object-as-0-based-array/39680>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 18, 2020, 7:43am UTC](https://discourse.julialang.org/t/is-there-a-way-to-reference-an-arbitrary-array-like-object-as-0-based-array/39680 "2020-05-18T07:43:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![astrojhgu](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@astrojhgu](https://discourse.julialang.org/u/astrojhgu)\
**Post date:** [May 18, 2020, 7:43am UTC](https://discourse.julialang.org/t/is-there-a-way-to-reference-an-arbitrary-array-like-object-as-0-based-array/39680/1 "2020-05-18T07:43:10Z")

</div>

There is such a customized indexing array in Julia, but its type is different from the built-in array type.

It is annoying to handle different types so is it possible to (at least when writing a function argument list) to wrap any array-like object to behavior like a 0-based array?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 18, 2020, 7:52am UTC](https://discourse.julialang.org/t/is-there-a-way-to-reference-an-arbitrary-array-like-object-as-0-based-array/39680/2 "2020-05-18T07:52:16Z")

</div>

> **[GitHub - JuliaArrays/OffsetArrays.jl: Fortran-like arrays with arbitrary,...](https://github.com/JuliaArrays/OffsetArrays.jl)**
>
> Fortran-like arrays with arbitrary, zero or negative starting indices. - GitHub - JuliaArrays/OffsetArrays.jl: Fortran-like arrays with arbitrary, zero or negative starting indices.

can wrap your existing array.
