Skip to content

Commit

Permalink
Fix show overload sometimes double printing (#112)
Browse files Browse the repository at this point in the history
* Fix show overload

* Bump version
  • Loading branch information
raphaelsaavedra authored Aug 28, 2020
1 parent 4765098 commit 036e012
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ScoreDrivenModels"
uuid = "4a87933e-d659-11e9-0e65-7f40dedd4a3a"
authors = ["guilhermebodin <[email protected]>, raphaelsaavedra <[email protected]>"]
version = "0.1.2"
version = "0.1.3"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Plots = "= 1.4.3"
ScoreDrivenModels = "= 0.1.2"
ScoreDrivenModels = "= 0.1.3"
16 changes: 8 additions & 8 deletions src/prints.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function Base.show(io::IO, est::EstimationStats{D, T}) where {D, T}
println("--------------------------------------------------------")
println("Distribution: ", D)
println("Number of observations: ", Int(est.num_obs))
println("Number of unknown parameters: ", Int(est.np))
println("Log-likelihood: ", @sprintf("%.4f", est.loglikelihood))
println("AIC: ", @sprintf("%.4f", est.aic))
println("BIC: ", @sprintf("%.4f", est.bic))
println(io, "--------------------------------------------------------")
println(io, "Distribution: ", D)
println(io, "Number of observations: ", Int(est.num_obs))
println(io, "Number of unknown parameters: ", Int(est.np))
println(io, "Log-likelihood: ", @sprintf("%.4f", est.loglikelihood))
println(io, "AIC: ", @sprintf("%.4f", est.aic))
println(io, "BIC: ", @sprintf("%.4f", est.bic))
print_coefs_stats(est.coefs_stats)
return nothing
end
Expand Down Expand Up @@ -63,4 +63,4 @@ function build_print(p_c, p_std, p_t_stat, p_p_val, param)
p *= " "^max(0, 10 - length(p_p_val))
p *= p_p_val
return p
end
end

2 comments on commit 036e012

@raphaelsaavedra
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/20452

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 036e0122cc6498b9c7a1d68d2072d98a2d39143c
git push origin v0.1.3

Please sign in to comment.