Skip to content

Commit b77e2d1

Browse files
Updating docstring of a class according to PEP 257 in a file (#4449)
* one class docs updated * Updated with docs with PEP 257 in one class * Updated with docs with PEP 257 in one class * updated * update * Update * update * Update pymc3/step_methods/metropolis.py Co-authored-by: Thomas Wiecki <[email protected]>
1 parent 07679ec commit b77e2d1

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

pymc3/step_methods/metropolis.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,7 @@ def __call__(self, num_draws=None):
9595

9696

9797
class Metropolis(ArrayStepShared):
98-
"""
99-
Metropolis-Hastings sampling step
100-
101-
Parameters
102-
----------
103-
vars: list
104-
List of variables for sampler
105-
S: standard deviation or covariance matrix
106-
Some measure of variance to parameterize proposal distribution
107-
proposal_dist: function
108-
Function that returns zero-mean deviates when parameterized with
109-
S (and n). Defaults to normal.
110-
scaling: scalar or array
111-
Initial scale factor for proposal. Defaults to 1.
112-
tune: bool
113-
Flag for tuning. Defaults to True.
114-
tune_interval: int
115-
The frequency of tuning. Defaults to 100 iterations.
116-
model: PyMC Model
117-
Optional model for sampling step. Defaults to None (taken from context).
118-
mode: string or `Mode` instance.
119-
compilation mode passed to Theano functions
120-
"""
98+
"""Metropolis-Hastings sampling step"""
12199

122100
name = "metropolis"
123101

@@ -144,6 +122,28 @@ def __init__(
144122
mode=None,
145123
**kwargs
146124
):
125+
"""Create an instance of a Metropolis stepper
126+
127+
Parameters
128+
----------
129+
vars: list
130+
List of variables for sampler
131+
S: standard deviation or covariance matrix
132+
Some measure of variance to parameterize proposal distribution
133+
proposal_dist: function
134+
Function that returns zero-mean deviates when parameterized with
135+
S (and n). Defaults to normal.
136+
scaling: scalar or array
137+
Initial scale factor for proposal. Defaults to 1.
138+
tune: bool
139+
Flag for tuning. Defaults to True.
140+
tune_interval: int
141+
The frequency of tuning. Defaults to 100 iterations.
142+
model: PyMC Model
143+
Optional model for sampling step. Defaults to None (taken from context).
144+
mode: string or `Mode` instance.
145+
compilation mode passed to Theano functions
146+
"""
147147

148148
model = pm.modelcontext(model)
149149

0 commit comments

Comments
 (0)