This repository has been archived by the owner on May 4, 2019. It is now read-only.
Open
Description
I think it'd be really useful to have a NullableArray equivalent of get(A, default)
.
Something along the lines of:
function Base.get{T}(A::NullableArrays.NullableArray{T}, y)
v = Array(T, size(A))
for i in eachindex(v)
if isbits(T)
v[i] = ifelse(A.isnull[i], convert(T, y), A.values[i])
else
v[i] = A.isnull[i] ? convert(T, y) : A.values[i]
end
end
return v
end
Metadata
Assignees
Labels
No labels