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

mention axes in docs instead of size #26233

Merged
merged 4 commits into from
Feb 27, 2018
Merged
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
5 changes: 5 additions & 0 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Return a tuple containing the dimensions of `A`. Optionally you can specify the
dimension(s) you want the length of, and get the length of that dimension, or a tuple of the
lengths of dimensions you asked for.

Note that `size` may not be defined for arrays with non-standard indices, in which case [`axes`](@ref)
may be useful. See the manual chapter on [arrays with custom indices](@ref man-custom-indices).

# Examples
```jldoctest
julia> A = fill(1, (2,3,4));
Expand All @@ -49,6 +52,8 @@ size(x, d1::Integer, d2::Integer, dx::Vararg{Integer, N}) where {N} =

Return the valid range of indices for array `A` along dimension `d`.

See also [`size`](@ref), and the manual chapter on [arrays with custom indices](@ref man-custom-indices).

# Examples
```jldoctest
julia> A = fill(1, (5,6,7));
Expand Down
2 changes: 1 addition & 1 deletion base/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Given the type of an iterator, return one of the following values:
* `SizeUnknown()` if the length (number of elements) cannot be determined in advance.
* `HasLength()` if there is a fixed, finite length.
* `HasShape{N}()` if there is a known length plus a notion of multidimensional shape (as for an array).
In this case `N` should give the number of dimensions, and the [`size`](@ref) function is valid
In this case `N` should give the number of dimensions, and the [`axes`](@ref) function is valid
for the iterator.
* `IsInfinite()` if the iterator yields values forever.

Expand Down
2 changes: 1 addition & 1 deletion doc/src/devdocs/offset-arrays.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Arrays with custom indices
# [Arrays with custom indices](@id man-custom-indices)

Julia 0.5 adds experimental support for arrays with arbitrary indices. Conventionally, Julia's
arrays are indexed starting at 1, whereas some other languages start numbering at 0, and yet others
Expand Down