-
Notifications
You must be signed in to change notification settings - Fork 28
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
merge
with undef
#86
Comments
So the closest thing in julia> vcat(Vector{String}(undef, 3), ["a", "b", "c"])
6-element Vector{String}:
#undef
#undef
#undef
"a"
"b"
"c"
julia> vcat(["a", "b", "c"], Vector{String}(undef, 3))
6-element Vector{String}:
"a"
"b"
"c"
#undef
#undef
#undef
julia> vcat(Vector{String}(undef, 3), [1, 2, 3])
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getindex
@ ./array.jl:861 [inlined]
[2] setindex!
@ ./array.jl:916 [inlined]
[3] _typed_vcat!(a::Vector{Any}, V::Tuple{Vector{String}, Vector{Int64}})
@ Base ./abstractarray.jl:1551
[4] _typed_vcat
@ ./abstractarray.jl:1543 [inlined]
[5] typed_vcat
@ ./abstractarray.jl:1619 [inlined]
[6] vcat(::Vector{String}, ::Vector{Int64})
@ SparseArrays ~/julia-1.7.2/share/julia/stdlib/v1.7/SparseArrays/src/sparsevector.jl:1123
[7] top-level scope
@ REPL[8]:1
julia> vcat([1, 2, 3], Vector{String}(undef, 3))
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getindex
@ ./array.jl:861 [inlined]
[2] setindex!
@ ./array.jl:916 [inlined]
[3] _typed_vcat!(a::Vector{Any}, V::Tuple{Vector{Int64}, Vector{String}})
@ Base ./abstractarray.jl:1551
[4] _typed_vcat
@ ./abstractarray.jl:1543 [inlined]
[5] typed_vcat
@ ./abstractarray.jl:1619 [inlined]
[6] vcat(::Vector{Int64}, ::Vector{String})
@ SparseArrays ~/julia-1.7.2/share/julia/stdlib/v1.7/SparseArrays/src/sparsevector.jl:1123
[7] top-level scope
@ REPL[9]:1 We are going to need something like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is another
undef
issue I came across:This may point to a need for fixing
copyto!
withundef
, which would fix this and the issue withcopy
fixed in #85.The text was updated successfully, but these errors were encountered: