Skip to content

Updating docstring of a class according to PEP 257 in a file #4449

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

Merged
merged 9 commits into from
Jan 31, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions pymc3/step_methods/metropolis.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,7 @@ def __call__(self, num_draws=None):


class Metropolis(ArrayStepShared):
"""
Metropolis-Hastings sampling step

Parameters
----------
vars: list
List of variables for sampler
S: standard deviation or covariance matrix
Some measure of variance to parameterize proposal distribution
proposal_dist: function
Function that returns zero-mean deviates when parameterized with
S (and n). Defaults to normal.
scaling: scalar or array
Initial scale factor for proposal. Defaults to 1.
tune: bool
Flag for tuning. Defaults to True.
tune_interval: int
The frequency of tuning. Defaults to 100 iterations.
model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
mode: string or `Mode` instance.
compilation mode passed to Theano functions
"""Metropolis-Hastings sampling step
"""

name = "metropolis"
Expand Down Expand Up @@ -144,6 +123,19 @@ def __init__(
mode=None,
**kwargs
):
"""Metropolis-Hastings sampling step

Arguments:
vars -- List of variables for sampler (default None)
Copy link
Member

Choose a reason for hiding this comment

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

This looks very different from all our other doc strings which follow the numpy style guide, can you make it adhere to that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh Sorry! My bad. I will fix it right away

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @twiecki : )

S -- Some measure of variance to parameterize proposal distribution (default None)
proposal_dist -- Function that returns zero-mean deviates when parameterized with
S (and n). Defaults to normal. (default None)
scaling -- Initial scale factor for proposal. (default 1.0)
tune -- Flag for tuning. (default True)
tune_interval -- The frequency of tuning. (default 100)
model -- Optional model for sampling step. Defaults to None (taken from context). (default None)
mode -- compilation mode passed to Theano functions. (default None)
"""

model = pm.modelcontext(model)

Expand Down