An open API service indexing awesome lists of open source software.

https://github.com/chifisource/carouselarrays.jl

Repeating Arrays for Julia
https://github.com/chifisource/carouselarrays.jl

Last synced: over 1 year ago
JSON representation

Repeating Arrays for Julia

Awesome Lists containing this project

README

          



Carousel Arrays



Carousel Arrays are Arrays that can be indexed repeatedly. Indexes below 1 will index starting with the end of the Vector, and indexes above the length of the Vector will index the beginning of the Vector.
```julia
julia> using CarouselArrays

julia> c = CarouselArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
CarouselArray{Int64}([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])

julia> c[25]
5

julia> c[-8]
2

julia> c[-2]
8

julia> c[0]
10

```