Skip to content

Commit

Permalink
Fix failure on Julia nightlies due to covm change
Browse files Browse the repository at this point in the history
'corrected' is now a keyword argument.
  • Loading branch information
nalimilan committed Jul 2, 2017
1 parent 6df21f0 commit ace4f0b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/cov.jl
Expand Up @@ -111,9 +111,16 @@ Compute the Pearson correlation matrix of `X` along the dimension
Base.cor(x::DenseMatrix, w::AbstractWeights, vardim::Int=1) =
Base.corm(x, Base.mean(x, w, vardim), w, vardim)

function mean_and_cov(x::DenseMatrix, vardim::Int=1; corrected::Bool=true)
m = mean(x, vardim)
return m, Base.covm(x, m, vardim, corrected)
if VERSION >= v"0.7.0-DEV.755"
function mean_and_cov(x::DenseMatrix, vardim::Int=1; corrected::Bool=true)
m = mean(x, vardim)
return m, Base.covm(x, m, vardim, corrected=corrected)
end
else
function mean_and_cov(x::DenseMatrix, vardim::Int=1; corrected::Bool=true)
m = mean(x, vardim)
return m, Base.covm(x, m, vardim, corrected)
end
end
function mean_and_cov(x::DenseMatrix, wv::AbstractWeights, vardim::Int=1;
corrected::DepBool=nothing)
Expand Down

0 comments on commit ace4f0b

Please sign in to comment.