-
Notifications
You must be signed in to change notification settings - Fork 38
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!(Eye(4), I) #206
Comments
trying to write to immutable arrays isn't really supported anywhere: julia> copyto!(1:5, 1:5)
ERROR: CanonicalIndexError: setindex! not defined for UnitRange{Int64}
Stacktrace:
[1] error_if_canonical_setindex(#unused#::IndexLinear, A::UnitRange{Int64}, #unused#::Int64)
@ Base ./abstractarray.jl:1352
[2] setindex!
@ ./abstractarray.jl:1343 [inlined]
[3] copyto_unaliased!
@ ./abstractarray.jl:1038 [inlined]
[4] copyto!(dest::UnitRange{Int64}, src::UnitRange{Int64})
@ Base ./abstractarray.jl:1018
[5] top-level scope
@ REPL[1]:1 |
That's not really the case for julia> Fill(2, 2) .= 2
2-element Fill{Int64}, with entries equal to 2 Nonetheless, this should be fixed in |
Ha interesting! I suspect I added that behaviour for Infinite arrays.....but can't remember the exact details. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This seems like a weird error in this context. Since
Eye(4)
is already anI
, this could just return without erroring?The text was updated successfully, but these errors were encountered: