-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
upgrade OffsetArrays to v1.3.0 #37643
upgrade OffsetArrays to v1.3.0 #37643
Conversation
073a4df
to
d702325
Compare
@timholy, I think this would just need a quick once-over from you. |
@@ -22,7 +22,7 @@ using Distributed: splitrange | |||
@test splitrange(-1, 1, 4) == Array{UnitRange{Int64},1}([-1:-1,0:0,1:1]) | |||
|
|||
const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") | |||
isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl")) | |||
isdefined(Main, :OffsetArrays) || @eval Main @everywhere include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It surprises me that this wasn't needed before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is because eachindex(oa)
requires axes(oa)
, which now returns OffsetArrays.IdOffsetRange
.
end | ||
|
||
@inline function Base.deleteat!(A::OffsetArray, i::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting — is there a reason why this was removed from OffsetArrays? Or has it never made it there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... I'm surprised that this seems to never appeared in OffsetArrays.jl codebase. My best guess of this not going into OffsetArrays.jl is to make clear the conceptual confusion between an array and a list.
There are tendencies to add support for OffsetList, though (e.g., JuliaArrays/OffsetArrays.jl#137, #37629)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense — and the old definition for deleteat!
doesn't really test any other base functionality, so I think this is fine to remove.
The definition for push!
is also changing, though, and in doing so I think we lose the test coverage on resize!
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resize!
tests are added in 1f9b290 (copied from OffsetArrays.jl
)
v1.2.0 introduces an ambiguity and thus not used.
OffsetArrays issues 133 and 100 are fixed by JuliaLang#37204.
d702325
to
c46776f
Compare
c46776f
to
18323b1
Compare
The test failure seems unrelated. |
Thanks @johnnychen94! |
Separated from #37629
cc: @timholy