Le lundi 18 avril 2016 à 13:16 -0700, paul.soederl...@gmail.com a
écrit :
> Hi and thanks for the reply.
> 
> However, I am not sure that I fully understand
> >NullableArrays are not needed if you only have NaNs
> 
> Maybe I have the wrong expectations about NullableArrays, but I hoped
> that it would provide a quick "excise": cut out all rows where there
> is a NaN in either X or Y and then do X'Y. Clearly, this excise can
> be done explicitly but that costs time and memory. Am I wrong in this
> expectation?
I'm not sure what you mean. In particular, if X and Y contain NaNs in
different places, removing rows/columns with NaNs may give matrices
with incompatible dimensions. Could you provide an example?

> Paul S
> 
> 
> 
> > Le lundi 18 avril 2016 à 07:40 -0700, paul.so...@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