Base doesn't have any way of checking which positions in an array have valid values.
``` .julia
a = Nullable{Float64}[]
for i in 1:10
push!(a, Nullable{Float64}())
end
a[1] = 2.0
isnull(a)
while the following works
``` .julia
map(x -> isnull(x), a)
What do you envision isnull(a) meaning?
Returning a boolean array with the values that are null. Something
similar to how isna already operates.
On Thu, Apr 28, 2016, at 17:56, John Myles White wrote:
What do you envision isnull(a) meaning?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub[1]
Links:
So it would be vectorized. I think that's not the best path forward for two reasons:
isnull(a) should return a Boolean.map(isnull, a)
Thanks everyone for weighing in. I guess with #13412 merged, using an anonymous function will be plenty fast.
@tlnagy As @andreasnoack said, you don't need an anonymous function at all, so it's already fast in 0.4. Also, with the syntax proposed at https://github.com/JuliaLang/julia/issues/8450, you might be able to write it as isnull.(a) at some point.
@nalimilan Good catch. I thought that used an anonymous function internally, but now I realize that doesn't make too much sense. Thanks!
Most helpful comment
map(isnull, a)