Skip to content

Commit 46a477a

Browse files
committed
move cor, cov, std, stdm, var, varm and linreg to StatsBase
fix #25571 (comment) (included in JuliaStats/StatsBase.jl#379) fix #23769 (included in JuliaStats/StatsBase.jl#379) fix #27140
1 parent 53d6c85 commit 46a477a

17 files changed

+17
-1103
lines changed

base/deprecated.jl

+9-13
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,6 @@ deprecate(Base, :DSP, 2)
293293
using .DSP
294294
export conv, conv2, deconv, filt, filt!, xcorr
295295

296-
# PR #21709
297-
@deprecate cov(x::AbstractVector, corrected::Bool) cov(x, corrected=corrected)
298-
@deprecate cov(x::AbstractMatrix, vardim::Int, corrected::Bool) cov(x, dims=vardim, corrected=corrected)
299-
@deprecate cov(X::AbstractVector, Y::AbstractVector, corrected::Bool) cov(X, Y, corrected=corrected)
300-
@deprecate cov(X::AbstractVecOrMat, Y::AbstractVecOrMat, vardim::Int, corrected::Bool) cov(X, Y, dims=vardim, corrected=corrected)
301-
302296
# PR #22325
303297
# TODO: when this replace is removed from deprecated.jl:
304298
# 1) rename the function replace_new from strings/util.jl to replace
@@ -1351,13 +1345,6 @@ export readandwrite
13511345
@deprecate findmin(A::AbstractArray, dims) findmin(A, dims=dims)
13521346

13531347
@deprecate mean(A::AbstractArray, dims) mean(A, dims=dims)
1354-
@deprecate varm(A::AbstractArray, m::AbstractArray, dims; kwargs...) varm(A, m; kwargs..., dims=dims)
1355-
@deprecate var(A::AbstractArray, dims; kwargs...) var(A; kwargs..., dims=dims)
1356-
@deprecate std(A::AbstractArray, dims; kwargs...) std(A; kwargs..., dims=dims)
1357-
@deprecate cov(X::AbstractMatrix, dim::Int; kwargs...) cov(X; kwargs..., dims=dim)
1358-
@deprecate cov(x::AbstractVecOrMat, y::AbstractVecOrMat, dim::Int; kwargs...) cov(x, y; kwargs..., dims=dim)
1359-
@deprecate cor(X::AbstractMatrix, dim::Int) cor(X, dims=dim)
1360-
@deprecate cor(x::AbstractVecOrMat, y::AbstractVecOrMat, dim::Int) cor(x, y, dims=dim)
13611348
@deprecate median(A::AbstractArray, dims; kwargs...) median(A; kwargs..., dims=dims)
13621349

13631350
@deprecate mapreducedim(f, op, A::AbstractArray, dims) mapreduce(f, op, A, dims=dims)
@@ -1673,6 +1660,15 @@ end
16731660
@deprecate next(s::AbstractString, i::Integer) iterate(s, i)
16741661
@deprecate done(s::AbstractString, i::Integer) i > ncodeunits(s)
16751662

1663+
# #27140, #27152
1664+
@deprecate_moved cor "StatsBase"
1665+
@deprecate_moved cov "StatsBase"
1666+
@deprecate_moved std "StatsBase"
1667+
@deprecate_moved stdm "StatsBase"
1668+
@deprecate_moved var "StatsBase"
1669+
@deprecate_moved varm "StatsBase"
1670+
@deprecate_moved linreg "StatsBase"
1671+
16761672
# issue #27093
16771673
# in src/jlfrontend.scm a call to `@deprecate` is generated for per-module `eval(m, x)`
16781674
@eval Core Main.Base.@deprecate(eval(e), Core.eval(Main, e))

base/exports.jl

-6
Original file line numberDiff line numberDiff line change
@@ -633,19 +633,13 @@ export
633633
set_zero_subnormals,
634634

635635
# statistics
636-
cor,
637-
cov,
638636
mean!,
639637
mean,
640638
median!,
641639
median,
642640
middle,
643641
quantile!,
644642
quantile,
645-
std,
646-
stdm,
647-
var,
648-
varm,
649643

650644
# iteration
651645
done,

0 commit comments

Comments
 (0)