-
-
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
copyto!
breaking change in v1.5
#36220
Comments
When the eltype and/or dimensionality is unspecified, there were 2 or 3 methods that might apply here (see `code_typed(copyto!, (Array, Array))`). Consequently partially-specified codegen tends to be poor for this operation. This harmonizes our implementations and eliminates eltype and dimensionality as a consideration for the dispatch. By default, it dispatches on `IndexStyle(src)` after a call to `unalias`, which makes sense because copying an array can change its preferred `IndexStyle`. It also fixes an aliasing bug.
I don't have such a strong opinion that the julia> VERSION
v"1.5.0-beta1.0"
julia> using OffsetArrays
julia> r = Ref(fill(1, (Base.OneTo(3), Base.OneTo(3))))
Base.RefValue{Array{Int64,2}}([1 1 1; 1 1 1; 1 1 1])
julia> r[] = fill(2, (3:5, 3:5))
3×3 OffsetArray(::Array{Int64,2}, 3:5, 3:5) with eltype Int64 with indices 3:5×3:5:
2 2 2
2 2 2
2 2 2
julia> r[]
3×3 Array{Int64,2}:
2 2 2
2 2 2
2 2 2 |
The new behavior is correct according to |
From triage: this is ok for |
Bump, anyone looking at this? |
The hard question is whether |
* origin/master: (232 commits) Add passthrough for non-Markdown docs (JuliaLang#36091) Fix pointer to no longer assume contiguity (JuliaLang#36405) Ensure string-hashing is defined before it gets used (JuliaLang#36411) Make compilecache atomic (JuliaLang#36416) add a test for JuliaLang#30739 (JuliaLang#36395) Fix broken links in docstring of `repeat` (JuliaLang#36376) fix and de-dup cached calls to `methods_by_ftype` in compiler (JuliaLang#36404) ml-matches: skip unnecessary work, when possible (JuliaLang#36413) gf: fix some issues with the move from using a tree to a hash lookup of leaf types (JuliaLang#36413) Add news and manual entry for sincospi (JuliaLang#36403) Check axes in Array(::AbstractArray) (fixes JuliaLang#36220) (JuliaLang#36397) add versions of `code_typed` and `which` that accept tuple types (JuliaLang#36389) Fix spelling of readdir. (JuliaLang#36409) add sincospi (JuliaLang#35816) fix showing methods with unicode gensymed variable names (JuliaLang#36396) Add doctest: eachslice (JuliaLang#36386) fix documentation typo ("Ingeger") Refactor `abstract_eval` to separate out statements and values (JuliaLang#36350) fix return type of `get!` on `IdDict` (JuliaLang#36383) Allow single option with REPL.TerminalMenus (JuliaLang#36369) ...
On v1.4:
via a dispatch to
julia/base/multidimensional.jl
Lines 958 to 965 in 44fa15b
whereas on v1.5 it does not throw.
f345c5f may be the cause.
The text was updated successfully, but these errors were encountered: