Le lundi 18 avril 2016 à 07:40 -0700, paul.soederl...@gmail.com a
écrit :
> Hi,
> 
> I want to use NullableArrays to facilitate some multivariate
> statistics (NaNs...). 
> 
> If X is a NullableArray{T,K} and Y is a NullableArray{T,L}, can I do
> X'Y? (My clumsy attempts say no, but I might have missed something.) 
> 
> Thanks for the help   /Paul S
It looks like you need to defined zero():
Base.zero{T}(::Nullable{T}) = Nullable(zero(T))

Then it works, at least for simple cases. You should probably file an
issue in GitHub against NullableArrays.jl so that we have a look at the
best solution for this. This method shouldn't be defined in Julia by
default (else many other methods will need a special treatment), but
NullableArrays could do something about this.


BTW, NullableArrays are not needed if you only have NaNs: floats handle
them just fine. They are only useful when you have null/missing values
other than NaN, or types other than floats.


Regards

Reply via email to