I am trying to multiply matrices, some of which can be entirely missing. I would expect the result to be a missing value (similar to Python). Instead I get InexactError: trunc(Int64, Inf)
omega = randn(10,10)
a = Array{Missing}(missing, 10, 1)
result = (a' * omega * a)[1]
If you reduce to a' * a
you already get the problem.
It seems to me that there is some problem in the Julia Base, unless this operation is truly invalid.
For now, it seems like you can avoid the problem by declaring a
the following way:
a = Array{Union{Missing, Float64}}(missing, 10, 1)
This disappears with the error.
I created an issue in Julia GitHub. Either this is something that should be advised against (and we need to have this somewhere in the manual) or it is a bug in Julia.