Skip to content

Commit 036e012

Browse files
Fix show overload sometimes double printing (#112)
* Fix show overload * Bump version
1 parent 4765098 commit 036e012

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ScoreDrivenModels"
22
uuid = "4a87933e-d659-11e9-0e65-7f40dedd4a3a"
33
authors = ["guilhermebodin <[email protected]>, raphaelsaavedra <[email protected]>"]
4-
version = "0.1.2"
4+
version = "0.1.3"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

examples/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
88

99
[compat]
1010
Plots = "= 1.4.3"
11-
ScoreDrivenModels = "= 0.1.2"
11+
ScoreDrivenModels = "= 0.1.3"

src/prints.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function Base.show(io::IO, est::EstimationStats{D, T}) where {D, T}
2-
println("--------------------------------------------------------")
3-
println("Distribution: ", D)
4-
println("Number of observations: ", Int(est.num_obs))
5-
println("Number of unknown parameters: ", Int(est.np))
6-
println("Log-likelihood: ", @sprintf("%.4f", est.loglikelihood))
7-
println("AIC: ", @sprintf("%.4f", est.aic))
8-
println("BIC: ", @sprintf("%.4f", est.bic))
2+
println(io, "--------------------------------------------------------")
3+
println(io, "Distribution: ", D)
4+
println(io, "Number of observations: ", Int(est.num_obs))
5+
println(io, "Number of unknown parameters: ", Int(est.np))
6+
println(io, "Log-likelihood: ", @sprintf("%.4f", est.loglikelihood))
7+
println(io, "AIC: ", @sprintf("%.4f", est.aic))
8+
println(io, "BIC: ", @sprintf("%.4f", est.bic))
99
print_coefs_stats(est.coefs_stats)
1010
return nothing
1111
end
@@ -63,4 +63,4 @@ function build_print(p_c, p_std, p_t_stat, p_p_val, param)
6363
p *= " "^max(0, 10 - length(p_p_val))
6464
p *= p_p_val
6565
return p
66-
end
66+
end

0 commit comments

Comments
 (0)