Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistics #27834

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1366,9 +1366,6 @@ export readandwrite
@deprecate findmax(A::AbstractArray, dims) findmax(A, dims=dims)
@deprecate findmin(A::AbstractArray, dims) findmin(A, dims=dims)

@deprecate mean(A::AbstractArray, dims) mean(A, dims=dims)
@deprecate median(A::AbstractArray, dims; kwargs...) median(A; kwargs..., dims=dims)

@deprecate mapreducedim(f, op, A::AbstractArray, dims) mapreduce(f, op, A, dims=dims)
@deprecate mapreducedim(f, op, A::AbstractArray, dims, v0) mapreduce(f, op, v0, A, dims=dims)
@deprecate reducedim(op, A::AbstractArray, dims) reduce(op, A, dims=dims)
Expand Down Expand Up @@ -1692,12 +1689,6 @@ end
@deprecate ipermute!(a, p::AbstractVector) invpermute!(a, p)

# #27140, #27152
@deprecate_moved cor "StatsBase"
@deprecate_moved cov "StatsBase"
@deprecate_moved std "StatsBase"
@deprecate_moved stdm "StatsBase"
@deprecate_moved var "StatsBase"
@deprecate_moved varm "StatsBase"
@deprecate_moved linreg "StatsBase"

# ?? more special functions to SpecialFunctions.jl
Expand Down
9 changes: 0 additions & 9 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -626,15 +626,6 @@ export
get_zero_subnormals,
set_zero_subnormals,

# statistics
mean!,
mean,
median!,
median,
middle,
quantile!,
quantile,

# iteration
done,
next,
Expand Down
7 changes: 0 additions & 7 deletions base/range.jl
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,6 @@ function sum(r::AbstractRange{<:Real})
: (step(r) * l) * ((l-1)>>1))
end

function mean(r::AbstractRange{<:Real})
isempty(r) && throw(ArgumentError("mean of an empty range is undefined"))
(first(r) + last(r)) / 2
end

median(r::AbstractRange{<:Real}) = mean(r)

function _in_range(x, r::AbstractRange)
if step(r) == 0
return !isempty(r) && first(r) == x
Expand Down
298 changes: 0 additions & 298 deletions base/statistics.jl

This file was deleted.

18 changes: 15 additions & 3 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,6 @@ using .StackTraces

include("initdefs.jl")

# statistics
include("statistics.jl")

# worker threads
include("threadcall.jl")

Expand Down Expand Up @@ -525,6 +522,7 @@ let
:Pkg,
:Test,
:REPL,
:Statistics,
]

maxlen = maximum(textwidth.(string.(stdlibs)))
Expand Down Expand Up @@ -895,6 +893,20 @@ end
@deprecate_stdlib send Sockets true
@deprecate_stdlib TCPSocket Sockets true
@deprecate_stdlib UDPSocket Sockets true

@deprecate_stdlib cor Statistics true
@deprecate_stdlib cov Statistics true
@deprecate_stdlib std Statistics true
@deprecate_stdlib stdm Statistics true
@deprecate_stdlib var Statistics true
@deprecate_stdlib varm Statistics true
@deprecate_stdlib mean! Statistics true
@deprecate_stdlib mean Statistics true
@deprecate_stdlib median! Statistics true
@deprecate_stdlib median Statistics true
@deprecate_stdlib middle Statistics true
@deprecate_stdlib quantile! Statistics true
@deprecate_stdlib quantile Statistics true
end
end

Expand Down
Loading