[julia-users] Re: ANN: NullableArrays.jl package

2015-10-19 Thread David Gold
@Matt, Actually, there currently do exist such constructors. One supplies the desired eltype of the resultant NullableArray, as well as the specific value that designates missingness in the argument array: *julia> **A = rand(Bool, 10)* *10-element Array{Bool,1}:* * false* * false* * true*

Re: [julia-users] Re: ANN: NullableArrays.jl package

2015-10-18 Thread Milan Bouchet-Valat
Le dimanche 18 octobre 2015 à 16:20 -0400, Sebastian Good a écrit : > I’ve considered whether it makes sense to have, say, a > NullableBits{T,V} where T is the bits type, e.g. Int64 or Float32, > and V is the special value which is considered null. Then you would > use a similar set of functions

[julia-users] Re: ANN: NullableArrays.jl package

2015-10-18 Thread Matt Bauman
On Sunday, October 18, 2015 at 3:54:13 PM UTC-4, David Gold wrote: > > @Sebastian: If I understand you correctly, then it should at least be > possible. If T is your datatype that behaves as such and x is the value of > type T that designates missingness, then it seems you could >

[julia-users] Re: ANN: NullableArrays.jl package

2015-10-18 Thread David Gold
@Sebastian: If I understand you correctly, then it should at least be possible. If T is your datatype that behaves as such and x is the value of type T that designates missingness, then it seems you could straightforwardly write your own method to convert an Array{T} to a NullableArray{T} that

[julia-users] Re: ANN: NullableArrays.jl package

2015-10-18 Thread David Gold
NullableArray{T, N} and Array{Nullable{T, N}} essentially follow the struct-of-arrays vs. array-of-struct distinction. All of the values of a NullableArray and all of the information about missingness/presence of values are each stored in separate Array objects, which allows for certain

Re: [julia-users] Re: ANN: NullableArrays.jl package

2015-10-18 Thread Sebastian Good
I’ve considered whether it makes sense to have, say, a NullableBits{T,V} where T is the bits type, e.g. Int64 or Float32, and V is the special value which is considered null. Then you would use a similar set of functions as defined in NullableArray to make operations on these numbers be

[julia-users] Re: ANN: NullableArrays.jl package

2015-10-17 Thread ggggg
How does NullableArray{T,N} compare to Array{Nullable{T},N}?

[julia-users] Re: ANN: NullableArrays.jl package

2015-10-17 Thread Sebastian Good
This brings to mind a question that commonly comes up in scientific computing: nullable arrays simulated through means of a canonical "no-data value", e.g in a domain where all values are expected to be negative, using +. It's ugly, but it's really common. From what I can see of the

[julia-users] Re: ANN: NullableArrays.jl package

2015-09-20 Thread David Gold
@Valentin Yes. In general: (i) it is simpler to write performant code for `NullableArray` objects than it is for `DataArray` objects; (ii) where applicable, passing a `NullableArray` argument into an extant `AbstractArray` interface tends to yield better performance than does passing in a