That document is aimed at developers to tell them how to make their package
ready for arrays that have custom indices. As a user, the key line is:

> Such array types are expected to be supplied through packages.

I recommend the OffsetArrays package.

Great to see someone interested in trying this. Definitely report any bugs
you find; as Isaiah said, this is still experimental functionality, and
many packages probably aren't fully ready yet. It will mostly take users
who want that functionality to notice where it needs to be added.

Best,
--Tim

On Mon, Oct 24, 2016 at 1:34 PM, Angel de Vicente <
angel.vicente.garr...@gmail.com> wrote:

> Hi,
>
> Isaiah Norton <isaiah.nor...@gmail.com> writes:
> >     mg = zeros(Int,(0:4,0:4))
> >
> > This isn't related to indexing -- it doesn't work with `1:4`
> > either.
>
> But it doesn't complain if I do:
> ,----
> | julia> mg=zeros(Int,(0:4))
> | 5-element Array{Int64,1}:
> |  0
> |  0
> |  0
> |  0
> |  0
> `----
>
> (though then I cannot access mg[0], the indices would go as for a
> standard Julia array, 1 to 5.
>
>
> > Use:
> > zeros(Int, 4, 4)
>
> Probably I'm missing something very basic, but then I would just have a
> normal array, where the indices would go from 1:4, in each dimension.
>
> In the page on "Arrays with custom indices" I don't see any clear
> example, so I'm a bit lost as to how I could create an array wih
> non-standard inidces and how to use it. Any basic example would be
> greatly appreciated.
>
> Thanks and sorry if I'm asking very basic questions, I just had a week
> or so of exposure to Julia...
> --
> Ángel de Vicente
> http://www.iac.es/galeria/angelv/
>

Reply via email to