-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Description
It ought to be possible to get a sub array of an array with undefined members - for cases where you want to allocate an array once and then use different functions to populate different parts of the array.
foo = cell(10)
init1(foo[1:4])
init2(foo[5:end])
Currently
julia> foo=cell(3)
3-element Any Array:
#undef
#undef
#undef
julia> bar=foo[2:end]
ERROR: access to undefined reference
in unsafe_copy! at array.jl:51
in copy! at array.jl:61
in getindex at array.jl:295
I understand why the above is happening but is it possible just to leave the same fields as undefined in the subarray?
Metadata
Metadata
Assignees
Labels
No labels