有没有办法在Julia中连接ArrayViews,它不会复制底层数据? (如果能解决问题,我也很乐意使用SubArray。)
在下面的代码中,例如,我想要一个引用y1
和y2
中数据的ArrayView。
julia> x = [1:50];
julia> using ArrayViews;
julia> y1 = view(x, 2:5);
julia> y2 = view(x, 44:48);
julia> concat(y1, y2) # I wish there were a function like this
ERROR: concat not defined
julia> [y1, y2] # This copies the data in y1 and y2, unfortunately
9-element Array{Int64,1}:
2
3
4
5
44
45
46
47
48