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? Paul S On Monday, 18 April 2016 19:13:07 UTC+2, Milan Bouchet-Valat wrote: > > Le lundi 18 avril 2016 à 07:40 -0700, [email protected] <javascript:> > 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 >
