Julia: inv(missing) not defined

Created on 19 Mar 2019  路  5Comments  路  Source: JuliaLang/julia

Julia 1.1.0
Although 1 ./ is defined and working ( and the docs claim that inv(x) is essentially one(x)/x ):

a = [1.0, 2.0, missing, 3.0]
1 ./ a
inv.(a)
## MethodError: no method matching inv(::Missing)
inv(missing)
## MethodError: no method matching inv(::Missing)
good first issue help wanted missing data

All 5 comments

I agree this should be added.

@JeffBezanson how could i go about adding this?

You can add it to the list at "Unary operators/functions" in base/missing.jl, and adjust tests in tests/missing.jl.

I am interested in solving this issue. I am going to include the following test: ismissing(inv(missing)). I don't think there would be a need for any additional documentation. Any suggestions?

Tests are also written using a loop over functions, so you just need to add inv to the list. We don't document any of these methods.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

musm picture musm  路  3Comments

omus picture omus  路  3Comments

iamed2 picture iamed2  路  3Comments

manor picture manor  路  3Comments

Keno picture Keno  路  3Comments