Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

find(x::Array{Nullable{Bool}}) gives useless results #76

Open
nalimilan opened this issue Sep 18, 2015 · 0 comments
Open

find(x::Array{Nullable{Bool}}) gives useless results #76

nalimilan opened this issue Sep 18, 2015 · 0 comments

Comments

@nalimilan
Copy link
Member

The behavior of find on Array{Nullable{Bool}} doesn't make any practical sense:

julia> x = [Nullable(true), Nullable(false)]
2-element Array{Nullable{Bool},1}:
 Nullable(true) 
 Nullable(false)

julia> find(x)
2-element Array{Int64,1}:
 1
 2

# Reason:
julia> Nullable(false) != 0
true

There's a special method for find(::NullableArray) which returns the expected result, but it doesn't sound great that arrays of Nullable{Bool} don't behave properly. Should Nullable(false) != 0 be equivalent to false != 0?

(This is a bit weird to report this against this repo, but since ==(::Nullable, ::Nullable) is defined here...)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant