Open
Description
In case the src array is shorter an error is thrown:
julia> map!(i->-i,ChainedVector([[1,2,3]]),[10:11...])
ERROR: MethodError: no method matching getindex(::Nothing, ::Int64)
The function `getindex` exists, but no method is defined for this combination of argument types.
Stacktrace:
[1] map!(f::var"#1#2", x::ChainedVector{Int64, Vector{Int64}}, A::Vector{Int64})
@ SentinelArrays ~/.julia/packages/SentinelArrays/vt8A6/src/chainedvector.jl:781
[2] top-level scope
@ REPL[8]:1
This is due to the fact that the implementation iterates the destination array instead of the src array.
Metadata
Assignees
Labels
No labels
Activity