-
-
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
map doesn't like most UnitRanges{<:Unsigned} #7709
Comments
|
If I add similar(r::Range, T::Type) = Array(T, size(r)...) to
abstractarray.jl
Warning: New definition
similar could not show value of type Tuple at abstractarray.jl:117
is ambiguous with:
similar could not show value of type Tuple at range.jl:167.
To fix, define
similar could not show value of type Tuple
before the new definition. I'm guessing the line number is off by one and it's actually ambiguous with similar (a::AbstractArray, T) = similar(a, T, size(a)) But I don't see how they're ambiguous, since The reason this fix works is because it hooks into Array(T::Type, d::Integer...) = Array(T, convert((Int...), d)) the above core constructor for Arrays rather than dispatching to Array{T,N}(::Type{T}, d::NTuple{N,Int}) =
ccall(:jl_new_array, Array{T,N}, (Any,Any), Array{T,N}, d) which is what all the other Anyway, sorry to be long-winded, but I'm running into this with a dates test failure for 32-bit, hence my interest 😄 |
Nope, the line number is correct. We can get more info from the prompt:
They overlap at Maybe we could instead add
? |
…Integer...) argument. This allows similar to work on ranges where the return type on size() doesn't necessarily equal Dims::(Int...). Fixes #7709.
…Integer...) argument. This allows similar to work on ranges where the return type on size() doesn't necessarily equal Dims::(Int...). Fixes #7709.
The text was updated successfully, but these errors were encountered: