Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"

[sources]
OffsetArrays = { path = ".." }

[compat]
Documenter = "0.27"
Documenter = "^1"
JSON = "0.21"
5 changes: 5 additions & 0 deletions docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ OffsetArrays.AxisConversionStyle
OffsetArrays.center
OffsetArrays.centered
```

# Internals
```@docs
Base.unsafe_wrap(::OffsetArrays.OffsetArrayUnion{T,N}, ::Ptr{T}, ::NTuple{N, OffsetArrays.OffsetAxisKnownLength}) where {T,N}
```
4 changes: 2 additions & 2 deletions src/axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ julia> ro[-1]
-1

julia> ro[3]
ERROR: BoundsError: attempt to access 3-element $(IdOffsetRange{Int, UnitRange{Int}}) with indices -1:1 at index [3]
ERROR: BoundsError: attempt to access 3-element $(nameof(IdOffsetRange)){$(nameof(Int)), UnitRange{$(nameof(Int))}} with indices -1:1 at index [3]
```

If the range doesn't start at 1, the values may be different from the indices:
Expand All @@ -37,7 +37,7 @@ julia> ro[-1]
9

julia> ro[3]
ERROR: BoundsError: attempt to access 3-element $(IdOffsetRange{Int, UnitRange{Int}}) with indices -1:1 at index [3]
ERROR: BoundsError: attempt to access 3-element $(nameof(IdOffsetRange)){$(nameof(Int)), UnitRange{$(nameof(Int))}} with indices -1:1 at index [3]
```

# Extended help
Expand Down
Loading