-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Subarray of an array with undefined members. #3868
Comments
You said you understood, but just to clear things up for anyone else that might be reading, julia> foo = cell(3)
3-element Any Array:
#undef
#undef
#undef
julia> bar = sub(foo, 2:3)
2-element SubArray of 3-element Any Array:
#undef
#undef So you're asking that undefined references be copied when you create a new array from a reference to part of that array? How is that useful? |
Sorry, I was using the term "sub array" to mean "part of the original array" and not in the Julian sense. I understand now that the part range of an array will always results in a copy. |
No worries. There's actually been a lot of recent discussion on making |
…626b0 (#54049) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: release-1.10 Julia branch: backports-release-1.10 Old commit: 70525539d New commit: f487626b0 Julia version: 1.10.2 Pkg version: 1.10.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@7052553...f487626 ``` $ git log --oneline 70525539d..f487626b0 f487626b0 Merge pull request #3868 from JuliaLang/backports-release-1.10 e4a6078a2 prune manifest after the set of some deps have been "demoted" to weakdeps (#3864) 72ba57759 Report failures to download artifacts as failures (#3860) 4ee732f1b why: show more when package is both a direct and indirect dep (#3771) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…626b0 (#54049) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: release-1.10 Julia branch: backports-release-1.10 Old commit: 70525539d New commit: f487626b0 Julia version: 1.10.2 Pkg version: 1.10.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@7052553...f487626 ``` $ git log --oneline 70525539d..f487626b0 f487626b0 Merge pull request #3868 from JuliaLang/backports-release-1.10 e4a6078a2 prune manifest after the set of some deps have been "demoted" to weakdeps (#3864) 72ba57759 Report failures to download artifacts as failures (#3860) 4ee732f1b why: show more when package is both a direct and indirect dep (#3771) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…626b0 (JuliaLang#54049) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: release-1.10 Julia branch: backports-release-1.10 Old commit: 70525539d New commit: f487626b0 Julia version: 1.10.2 Pkg version: 1.10.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@7052553...f487626 ``` $ git log --oneline 70525539d..f487626b0 f487626b0 Merge pull request JuliaLang#3868 from JuliaLang/backports-release-1.10 e4a6078a2 prune manifest after the set of some deps have been "demoted" to weakdeps (#3864) 72ba57759 Report failures to download artifacts as failures (JuliaLang#3860) 4ee732f1b why: show more when package is both a direct and indirect dep (JuliaLang#3771) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
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.
Currently
I understand why the above is happening but is it possible just to leave the same fields as undefined in the subarray?
The text was updated successfully, but these errors were encountered: