Skip to content

Commit 7d65da8

Browse files
committed
promotion
1 parent 7f25906 commit 7d65da8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/UnivariateDistribution/Distortions/BivEVDistortion.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ struct BivEVDistortion{TT,T} <: Distortion
66
j::Int8
77
uⱼ::T
88
end
9-
function Distributions.logcdf(D::BivEVDistortion, z::Real)
10-
T = typeof(z)
9+
function Distributions.logcdf(D::BivEVDistortion{TT,TF1}, z::Real) where {TT,TF1}
10+
T = promote_type(typeof(z), TF1)
1111
# bounds and degeneracies
1212
z 0 && return T(-Inf) # P(X ≤ 0) = 0
1313
z 1 && return T(0) # P(X ≤ 1) = 1
@@ -36,8 +36,8 @@ function Distributions.logcdf(D::BivEVDistortion, z::Real)
3636
return min(logval + log(max(tolog, T(0))), T(0))
3737
end
3838

39-
function Distributions.logpdf(D::BivEVDistortion, z::Real)
40-
T = typeof(z)
39+
function Distributions.logpdf(D::BivEVDistortion{TT,TF1}, z::Real) where {TT,TF1}
40+
T = promote_type(typeof(z), TF1)
4141
# Support and degeneracies
4242
z 0 && return T(-Inf)
4343
z 1 && return T(-Inf)

test/runtests.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ const rng = StableRNG(123)
77

88
# You can comment the lines to avoid running some tests while you develop:
99
testfiles = [
10-
"Aqua",
11-
"ArchimedeanCopulas",
12-
"ConditionalDistribution",
13-
"EllipticalCopulas",
14-
"FittingTest",
15-
"MiscelaneousCopulas",
16-
"SklarDist",
10+
# "Aqua",
11+
# "ArchimedeanCopulas",
12+
# "ConditionalDistribution",
13+
# "EllipticalCopulas",
14+
# "FittingTest",
15+
# "MiscelaneousCopulas",
16+
# "SklarDist",
1717
"GenericTests",
1818
]
1919

2020
# You can override the definition of this GenericTestFilter if you want.
21-
GenericTestFilter(C) = true # the default value lets every copula go through.
21+
# GenericTestFilter(C) = true # the default value lets every copula go through.
2222

2323
# An example:
24-
# GenericTestFilter(C) = C isa BC2Copula || C isa MOCopula || C isa CuadrasAugeCopula # || C isa GumbelCopula # You can filter on your model.
24+
GenericTestFilter(C) = C isa BC2Copula #|| C isa MOCopula || C isa CuadrasAugeCopula # || C isa GumbelCopula # You can filter on your model.
2525

2626
@testset verbose=true "Copulas.jl testings" begin
2727
@testset verbose=true "f = $f.jl" for f in testfiles

0 commit comments

Comments
 (0)