Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved implementation of show for distributions #290

Merged
merged 1 commit into from
Nov 1, 2014
Merged

Conversation

lindahua
Copy link
Contributor

I rewrote the codes for showing distributions. Hopefully, things look better now.

julia> using Distributions

julia> Normal(2.0, 1.5)
Normal=2.0, σ=1.5)

julia> Beta(1.0, 2.3)
Beta(alpha=1.0, beta=2.3)

julia> Categorical([0.2, 0.5, 0.3])
Categorical(K=3, prob=[0.2,0.5,0.3])

julia> Multinomial(10, [0.2, 0.5, 0.3])
Multinomial(n=10, prob=[0.2,0.5,0.3])

julia> MvNormal(eye(3))
GenericMvNormal{PDMat}(
dim: 3
μ: [0.0,0.0,0.0]
Σ: 3x3 Array{Float64,2}:
 1.0  0.0  0.0
 0.0  1.0  0.0
 0.0  0.0  1.0
)


julia> IsoNormal(3, 2.0)
GenericMvNormal{ScalMat}(
dim: 3
μ: [0.0,0.0,0.0]
Σ: 3x3 Array{Float64,2}:
 4.0  0.0  0.0
 0.0  4.0  0.0
 0.0  0.0  4.0
)


julia> Dirichlet([2.0, 3.0, 4.0, 5.0])
Dirichlet(alpha=[2.0,3.0,4.0,5.0])

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 13b79fe on dh/show2 into d9fd2c4 on master.

@lindahua
Copy link
Contributor Author

Feedbacks are appreciated. I will wait one or two days, and may merge this if there's no objection.

@simonbyrne
Copy link
Member

+1

@kmsquire
Copy link
Contributor

LGTM.

On Friday, October 31, 2014, Simon Byrne notifications@github.com wrote:

+1


Reply to this email directly or view it on GitHub
#290 (comment)
.

@johnmyleswhite
Copy link
Member

Looks great.

@dmbates
Copy link
Contributor

dmbates commented Oct 31, 2014

+1

lindahua added a commit that referenced this pull request Nov 1, 2014
Improved implementation of `show` for distributions
@lindahua lindahua merged commit 4699002 into master Nov 1, 2014
@ararslan ararslan deleted the dh/show2 branch September 29, 2016 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants