JuliaArrays / JuliaArrays/InfiniteArrays.jl
Support vcat of vcat
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 76
- Forks
- 9
- Avg merge
- 16h 56m
- Merged PRs (30d)
- 1
Description
This should work in both cases:
julia> vcat(2, vcat(1, Zeros(∞)))
∞-element LazyArrays.CachedArray{Float64,1,Array{Float64,1},Zeros{Float64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}} with indices OneToInf():
2.0
1.0
0.0
0.0
0.0
0.0
0.0
0.0
⋮
julia> vcat(2, vcat(1, Fill(2,∞)))
^CERROR: InterruptException:
Stacktrace:
[1] Array at ./boot.jl:406 [inlined]
[2] similar at ./array.jl:379 [inlined]
[3] _vec_resizedata!(::LazyArrays.CachedArray{Int64,1,Array{Int64,1},Zeros{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}}, ::Int64) at /Users/sheehanolver/Projects/LazyArrays.jl/src/cache.jl:128
[4] resizedata! at /Users/sheehanolver/Projects/LazyArrays.jl/src/cache.jl:139 [inlined]
[5] resizedata! at /Users/sheehanolver/Projects/LazyArrays.jl/src/cache.jl:114 [inlined]
[6] setindex! at /Users/sheehanolver/Projects/LazyArrays.jl/src/cache.jl:72 [inlined]
[7] setindex! at ./subarray.jl:298 [inlined]
[8] copyto_unaliased!(::IndexCartesian, ::SubArray{Int64,1,LazyArrays.CachedArray{Int64,1,Array{Int64,1},Zeros{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}},Tuple{InfiniteArrays.InfUnitRange{Int64}},false}, ::IndexCartesian, ::Fill{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}) at ./abstractarray.jl:874
[9] copyto!(::SubArray{Int64,1,LazyArrays.CachedArray{Int64,1,Array{Int64,1},Zeros{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}},Tuple{InfiniteArrays.InfUnitRange{Int64}},false}, ::Fill{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}) at ./abstractarray.jl:840
[10] _copyto!(::LazyArrays.PaddedLayout{DenseColumnMajor}, ::FillLayout, ::SubArray{Int64,1,LazyArrays.CachedArray{Int64,1,Array{Int64,1},Zeros{Int64,1,Tuple{InfiniteArrays.OneToInf{Int64}}}},Tuple{InfiniteArrays.InfUnitRange{Int64}},false^Cnt64ERROR: InterruptException:
Stacktrace:
[1] sigatomic_end at ./c.jl:425 [inlined]
[2] uv_write(::Base.TTY, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:929
[3] unsafe_write(::Base.TTY, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:1005
[4] unsafe_write at ./io.jl:337 [inlined]
[5] unsafe_write at ./io.jl:622 [inlined]
[6] write at ./io.jl:686 [inlined]
[7] print at ./show.jl:210 [inlined]
[8] show_sym(::IOContext{Base.TTY}, ::Symbol; allow_macroname::Bool) at ./show.jl:1086
[9] show_sym at ./show.jl:1085 [inlined]
[10] show_type_name(::IOContext{Base.TTY}, ::Core.TypeName) at ./show.jl:591
[11] show_datatype(::IOContext{Base.TTY}, ::DataType) at ./show.jl:618
[12] show(::IOContext{Base.TTY}, ::Type) at ./show.jl:497
[13] show_datatype(::IOContext{Base.TTY}, ::DataType) at ./show.jl:612
[14] show(::IOContext{Base.TTY}, ::Type) at ./show.jl:497
[15] show_datatype(::IOContext{Base.TTY}, ::DataType) at ./show.jl:612
[16] show(::IOContext{Base.TTY}, ::Type) at ./show.jl:497
[17] show_datatype(::IOContext{Base.TTY}, ::DataType) at ./show.jl:612
[18] show(::IOContext{Base.TTY}, ::Type) at ./show.jl:497
[19] print(::IOContext{Base.TTY}, ::Type{T} where T) at ./strings/io.jl:35
[20] print(::IOContext{Base.TTY}, ::String, ::Type{T} where T) at ./strings/io.jl:46
[21] show_tuple_as_call(::IOContext{Base.TTY}, ::Symbol, ::Type{T} where T, ::Bool, ::Nothing) at ./show.jl:1788
[22] show_tuple_as_call(::IOContext{Base.TTY}, ::Symbol, ::Type{T} where T, ::Bool) at ./show.jl:1755
[23] show_spec_linfo(::IOContext{Base.TTY}, ::Base.StackTraces.StackFrame) at ./stacktraces.jl:242
[24] show(::IOContext{Base.TTY}, ::Base.StackTraces.StackFrame; full_path::Bool) at ./stacktraces.jl:253
[25] show_trace_entry(::IOContext{Base.TTY}, ::Base.StackTraces.StackFrame, ::Int64; prefix::String) at ./errorshow.jl:555
[26] show_backtrace(::IOContext{Base.TTY}, ::Array{Base.StackTraces.StackFrame,1}) at ./errorshow.jl:659
[27] showerror(::IOContext{Base.TTY}, ::InterruptException, ::Array{Base.StackTraces.StackFrame,1}; backtrace::Bool) at ./errorshow.jl:93
[28] showerror at ./errorshow.jl:88 [inlined]
[29] display_repl_error(::Base.TTY, ::InterruptException, ::Array{Base.StackTraces.StackFrame,1}) at /Users/sheehanolver/.vscode/extensions/julialang.language-julia-1.0.4/scripts/packages/VSCodeServer/src/repl.jl:104
[30] display_repl_error(::Base.TTY, ::LoadError, ::Array{Base.StackTraces.StackFrame,1}) at /Users/sheehanolver/.vscode/extensions/julialang.language-julia-1.0.4/scripts/packages/VSCodeServer/src/repl.jl:107
[31] evalrepl(::Module, ::String, ::REPL.LineEditREPL, ::REPL.LineEdit.Prompt) at /Users/sheehanolver/.vscode/extensions/julialang.language-julia-1.0.4/scripts/packages/VSCodeServer/src/repl.jl:84
[32] top-level scope at /Users/sheehanolver/.vscode/extensions/julialang.language-julia-1.0.4/scripts/packages/VSCodeServer/src/repl.jl:73
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the nested vcat examples with Zeros(∞) and Fill(2,∞), then inspect the LazyArrays cache path shown in src/cache.jl, especially resizedata! and setindex!. The fix is done when both examples work without attempting an unbounded materialization and the resulting values match the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100