Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark require_one_based_indexing and has_offset_axes as public #56196

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ New library features
the uniquing checking ([#53474])
* `RegexMatch` objects can now be used to construct `NamedTuple`s and `Dict`s ([#50988])
* `Lockable` is now exported ([#54595])
* `Base.require_one_based_indexing` and `Base.has_offset_axes` are now public ([#56196])
* New `ltruncate`, `rtruncate` and `ctruncate` functions for truncating strings to text width, accounting for char widths ([#55351])

Standard library changes
Expand Down
4 changes: 4 additions & 0 deletions base/public.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public
acquire,
release,

# arrays
has_offset_axes,
require_one_based_indexing,

# collections
IteratorEltype,
IteratorSize,
Expand Down
6 changes: 6 additions & 0 deletions doc/src/base/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ Base.checkindex
Base.elsize
```

The following functions can be used to handle arrays with custom indices:
adrhill marked this conversation as resolved.
Show resolved Hide resolved
```@docs
Base.require_one_based_indexing
Base.has_offset_axes
```

## Views (SubArrays and other view types)

A “view” is a data structure that acts like an array (it is a subtype of `AbstractArray`), but the underlying data is actually
Expand Down
Loading