-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Widen RangeIndex from Int to BitInteger #43262
Conversation
658999c
to
95df4b4
Compare
This PR should have a test. |
Yes, thanks for reminding me. As you can see, I also am still trying to get the current tests to pass. |
Are any of the test failures related? |
8547cc7
to
ce5a525
Compare
Thanks for the rebase. I'm embarrassed by the poor branch naming here. |
@StefanKarpinski, is there anything here for me to fix? |
Nope, all good! Thanks for the PR. |
@@ -112,6 +112,8 @@ struct RefArray{T,A<:AbstractArray{T},R} <: Ref{T} | |||
end | |||
RefArray(x::AbstractArray{T}, i::Int, roots::Any) where {T} = RefArray{T,typeof(x),Any}(x, i, roots) | |||
RefArray(x::AbstractArray{T}, i::Int=1, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, i, nothing) | |||
RefArray(x::AbstractArray{T}, i::Integer, roots::Any) where {T} = RefArray{T,typeof(x),Any}(x, Int(i), roots) | |||
RefArray(x::AbstractArray{T}, i::Integer=1, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, Int(i), nothing) |
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.
RefArray(x::AbstractArray{T}, i::Integer=1, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, Int(i), nothing) | |
RefArray(x::AbstractArray{T}, i::Integer, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, Int(i), nothing) |
I don't think you meant to overwrite the previous RefArray(x::AbstractArray{T})
method here
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.
Good point.
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 created a new pull request in #47337
This removes the default argument in `RefArray(x::AbstractArray{T}, i::Integer=1)` such that it does not override `RefArray(x::AbstractArray{T}, i::Int=1)` xref: JuliaLang#43262 (comment) cc: @vtjnash
This removes the default argument in `RefArray(x::AbstractArray{T}, i::Integer=1)` such that it does not override `RefArray(x::AbstractArray{T}, i::Int=1)`. Refs: #43262 (comment)
Could we widen
RangeIndex
to include indices that are aBitInteger
?