Skip to content

Commit d9e421c

Browse files
committed
Fix for Julia 1.0
1 parent aac28e2 commit d9e421c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mutualinfo.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ in the denominator is computed. It can be one of:
5555
"""
5656
function mutualinfo(a, b; method::Union{Nothing, Symbol} = nothing, normed::Union{Nothing, Bool} = nothing, kwargs...)
5757
# Disallow `method` and `normed` to be used together
58-
if isnothing(method)
59-
isnothing(normed) || Base.depwarn("`normed` kwarg is deprecated, please use `method=:normalized` instead of `normed=true`, and `method=:classic` instead of `normed=false'", :mutualinfo)
60-
method = if isnothing(normed) || normed
58+
if method === nothing
59+
(normed === nothing) || Base.depwarn("`normed` kwarg is deprecated, please use `method=:normalized` instead of `normed=true`, and `method=:classic` instead of `normed=false'", :mutualinfo)
60+
method = if (normed === nothing) || normed
6161
:normalized
6262
else
6363
:classic
6464
end
6565
else
66-
isnothing(normed) || throw(ArgumentError("`normed` kwarg is not compatible with `method` kwarg"))
66+
(normed === nothing) || throw(ArgumentError("`normed` kwarg is not compatible with `method` kwarg"))
6767
end
6868
# Little hack to ensure the invalid kwargs error is thrown
6969
if method === :adjusted && length(kwargs) >= 1 && :aggregate keys(kwargs)

0 commit comments

Comments
 (0)