From 9c5d968f2db2642ff0945b8eb3e9b58a718aecc0 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Sat, 21 Sep 2024 22:15:15 +0200 Subject: [PATCH] Change deprecations --- src/deprecates.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/deprecates.jl b/src/deprecates.jl index ae2306de8..f2b4e7272 100644 --- a/src/deprecates.jl +++ b/src/deprecates.jl @@ -53,11 +53,13 @@ end @deprecate expectation(distr::Union{UnivariateDistribution,MultivariateDistribution}, g::Function; kwargs...) expectation(g, distr; kwargs...) false # Deprecate `MatrixReshaped` -const MatrixReshaped{S<:ValueSupport,D<:MultivariateDistribution{S}} = ReshapedDistribution{2,S,D} -@deprecate MatrixReshaped( +Base.@deprecate_binding MatrixReshaped ReshapedDistribution{2} +# We use the alias `ReshapedDistribution{2}` here to not throw a deprecation warning/error +# We do not export the function since MatrixReshaped (two lines above) is already exported +# and `ReshapedDistribution` is kept internal +Base.@deprecate ReshapedDistribution{2}( d::MultivariateDistribution, n::Integer, p::Integer=n -) reshape(d, (n, p)) -Base.deprecate(@__MODULE__, :MatrixReshaped) +) reshape(d, (n, p)) false for D in (:InverseWishart, :LKJ, :MatrixBeta, :MatrixFDist, :Wishart) @eval @deprecate dim(d::$D) size(d, 1)