We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
foldr(-,2:2)
foldl(-,2:2)
I assume this change was intentional:
julia> foldr(-,2:2) # 0.5 2
julia> foldr(-,2:2) # 0.6 ERROR: BoundsError: attempt to access 1-element UnitRange{Int64} at index [0] Stacktrace: [1] throw_boundserror(::UnitRange{Int64}, ::Int64) at ./abstractarray.jl:426 [2] getindex at ./range.jl:464 [inlined] [3] mapfoldr_impl(::Base.#identity, ::Base.#-, ::Int64, ::UnitRange{Int64}, ::Int64) at ./reduce.jl:110 [4] mapfoldr(::Base.#identity, ::Function, ::UnitRange{Int64}) at ./reduce.jl:139 [5] foldr(::Function, ::UnitRange{Int64}) at ./reduce.jl:166
The reason behind this change makes sense, but the error message was confusing.
The text was updated successfully, but these errors were encountered:
Actually, I think it's a bug:
_ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.6.0-pre.alpha.193 (2017-03-20 02:33 UTC) _/ |\__'_|_|_|\__'_| | Commit 28ea9d4 (0 days old master) |__/ | x86_64-apple-darwin16.4.0 julia> reduce(-,2:2) 2 julia> foldl(-,2:2) 2 julia> foldr(-,2:2) ERROR: BoundsError: attempt to access 1-element UnitRange{Int64} at index [0] Stacktrace: [1] throw_boundserror(::UnitRange{Int64}, ::Int64) at ./abstractarray.jl:426 [2] getindex at ./range.jl:464 [inlined] [3] mapfoldr_impl(::Base.#identity, ::Base.#-, ::Int64, ::UnitRange{Int64}, ::Int64) at ./reduce.jl:110 [4] mapfoldr(::Base.#identity, ::Function, ::UnitRange{Int64}) at ./reduce.jl:139 [5] foldr(::Function, ::UnitRange{Int64}) at ./reduce.jl:166
Sorry, something went wrong.
Note this is related to #20144
No branches or pull requests
I assume this change was intentional:
The reason behind this change makes sense, but the error message was confusing.
The text was updated successfully, but these errors were encountered: