Skip to content

Commit

Permalink
Fix deprecation warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Sep 5, 2024
1 parent b219803 commit dc0b1a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Distributions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export
MatrixBeta,
MatrixFDist,
MatrixNormal,
MatrixReshaped,
MatrixTDist,
MixtureModel,
Multinomial,
Expand Down
2 changes: 1 addition & 1 deletion src/deprecates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ end

# Deprecate `MatrixReshaped`
const MatrixReshaped{S<:ValueSupport,D<:MultivariateDistribution{S}} = ReshapedDistribution{2,S,D}
Base.deprecate(@__MODULE__, :MatrixReshaped)
@deprecate MatrixReshaped(
d::MultivariateDistribution, n::Integer, p::Integer=n
) reshape(d, (n, p))
Base.deprecate(@__MODULE__, :MatrixReshaped)

for D in (:InverseWishart, :LKJ, :MatrixBeta, :MatrixFDist, :Wishart)
@eval @deprecate dim(d::$D) size(d, 1)
Expand Down
2 changes: 1 addition & 1 deletion test/matrixreshaped.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function test_matrixreshaped(rng, d1, sizes)
@testset "MatrixReshaped $(nameof(typeof(d1))) tests" begin
@testset "MatrixReshaped constructor" begin
for d in d1s
@test d isa MatrixReshaped
@test_deprecated(@test d isa MatrixReshaped)
end
end
@testset "MatrixReshaped constructor errors" begin
Expand Down

0 comments on commit dc0b1a3

Please sign in to comment.