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

Clarify docstring for sample_prior_predictive(). #3114

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

rpgoldman
Copy link
Contributor

The previous docstring implied that the function received variables as parameter, and returned them as dictionary keys. But in fact, variable names are used everywhere.
A better fix might be to allow variables as well as variable names, but this is a quicker fix.

@ColCarroll ColCarroll merged commit 83d0af5 into pymc-devs:master Jul 24, 2018
@ColCarroll
Copy link
Member

Thank you!

That is also a good point that variables are used interchangeably elsewhere with variable name strings.

@rpgoldman rpgoldman deleted the sample_prior_predictive-docs branch July 24, 2018 15:33
@@ -1294,15 +1294,17 @@ def sample_prior_predictive(samples=500, model=None, vars=None, random_seed=None
Number of samples from the prior predictive to generate. Defaults to 500.
model : Model (optional if in `with` context)
vars : iterable
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we call this varnames like elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If that's a general convention, I could put a new PR for this.
Also, a follow-up question that we could use to clarify the docstring - am I correct in thinking that sample_prior_predictive() will ignore any observations that are in the model? If so, we could extend the docstring to make this clear.

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.

None yet

3 participants