# InexactError when multiplying entirely missing matrices

**URL:** <https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749>\
**Category:** New to Julia\
**Created:** [January 21, 2021, 10:37pm UTC](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749 "2021-01-21T22:37:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![max\_schwarzer](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@max\_schwarzer](https://discourse.julialang.org/u/max_schwarzer)\
**Post date:** [January 21, 2021, 10:37pm UTC](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749/1 "2021-01-21T22:37:48Z")

</div>

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)`

```julia
omega = randn(10,10)
a = Array{Missing}(missing, 10, 1)

result = (a' * omega * a)[1]

```

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [January 21, 2021, 10:45pm UTC](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749/2 "2021-01-21T22:45:17Z")

</div>

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:

```julia
a = Array{Union{Missing, Float64}}(missing, 10, 1)

```

This disappears with the error.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [January 22, 2021, 2:25pm UTC](https://discourse.julialang.org/t/inexacterror-when-multiplying-entirely-missing-matrices/53749/3 "2021-01-22T14:25:28Z")

</div>

I created an [issue](https://github.com/JuliaLang/julia/issues/39362) 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.
