Skip to content

Commit

Permalink
move move cor, cov, std, stdm, var, varm and linreg to StatsBase
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed May 28, 2018
1 parent bb5138e commit 72896d2
Show file tree
Hide file tree
Showing 12 changed files with 1,311 additions and 81 deletions.
13 changes: 13 additions & 0 deletions src/StatsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,24 @@ module StatsBase
export midpoints
end

const BASESTATS_IN_STATSBASE = VERSION >= v"0.7.0-DEV.5238"

if VERSION < v"0.7.0-DEV.3665"
myscale!(A::AbstractArray, b::Number) = scale!(A, b)
else
myscale!(A::AbstractArray, b::Number) = rmul!(A, b)
end

@static if BASESTATS_IN_STATSBASE
export cor, cov, std, stdm, var, varm, linreg
include("base.jl")
const Compatvarm = varm
else
import Base: cov, var, varm, std, stdm, sqrt!,
unscaled_covzm, cor, varm!, covm, corm, cov2cor!
const Compatvarm = Compat.varm
end

# source files

include("common.jl")
Expand Down
Loading

0 comments on commit 72896d2

Please sign in to comment.