Skip to content

Avoid error when unconstrained_params is empty#1

Open
postylem wants to merge 1 commit into
mugamma:masterfrom
postylem:patch-1
Open

Avoid error when unconstrained_params is empty#1
postylem wants to merge 1 commit into
mugamma:masterfrom
postylem:patch-1

Conversation

@postylem
Copy link
Copy Markdown

Calling rand(Distributions.Dirichlet(unconstrained_params)) gives an error when there are no unconstrained params. Instead should return unconstrained_vals as an empty array, no?

Calling `rand(Distributions.Dirichlet(unconstrained_params))` gives an error when there are no unconstrained params. Instead should return unconstrained_vals as an empty array, no?

Also I see an identical dirichlet.jl file in other places [e.g. here](https://github.com/Matheer0/probabilistic-programming/blob/16c85a37a71ba0414ac44f0ec3ab34e9071982b5/dirichlet.jl).  I also made a PR there, but I'm not sure where this code originally came from, so I'm making it here too.
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.

1 participant