-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
rangesEverything AbstractRangeEverything AbstractRange
Description
The code in range.jl was presumably written under the assumption that all ranges (or all arrays) are 1-based. With IdentityUnitRange
, this is not true anymore, and this leads to problems. I have found the following issues: For
u = 2:4
v = Base.IdentityUnitRange(2:4)
w = 1:9
one gets:
julia> axes(u) == axes(v), u == v # equal arrays must have equal axes
(false, true)
julia> w[v][2], w[v[2]] # the documentation defines w[v][i] to be w[v[i]]
(3, 2)
This happens with Julia 1.10.4, 1.11.0-beta2 and master.
EDIT: I've just noticed that while IdentityUnitRange
has a docstring, it is not mentioned in the documentation. Maybe it is considered internal.
Metadata
Metadata
Assignees
Labels
rangesEverything AbstractRangeEverything AbstractRange