-
Notifications
You must be signed in to change notification settings - Fork 19
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
Should there be a MissingVector
like SparseVector
Type?
#140
Comments
We have this already over at SentinelVectors.jl: https://github.com/JuliaData/SentinelArrays.jl/blob/main/src/missingvector.jl. We could move it here if people would prefer. |
Sorry, I should be more specific. I mean something that is sparsely populated. julia> x = SentinelVector{Float64}(undef, 1000);
julia> x[[1, 2, 4]] = [1, 2, 3]
3-element Vector{Int64}:
1
2
3
julia> y = sparsevec(zeros(1000));
julia> y[[1, 2, 4]] = [1, 2, 3]
3-element Vector{Int64}:
1
2
3
julia> Base.summarysize(x)
8056
julia> Base.summarysize(y)
152 |
I imagine that could be useful, but I'd rather put this in a dedicated package, and keep only simple convenience functions in Missings.jl. It's a standard convention to have packages called XXXArrays.jl defining the |
@Tokazama, sorry, I linked specifically to the "missingvector.jl" file in the SentinelArrays.jl package, which actually is the home to 3 different array types: SentinelArray, MissingVector, and ChainedVector. The |
Let's close this then as this should probably not live in Missings.jl anyway. |
Sometimes I want to have something that is essentially
SparseVector
but instead of returning zeros it would returnmissing
. Would this be a welcome addition here?The text was updated successfully, but these errors were encountered: