Skip to content

Commit 54c6d06

Browse files
fix stupid space between attributes in docs (#3822)
1 parent fb156af commit 54c6d06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+963
-963
lines changed

pymc3/backends/base.py

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ class BaseTrace:
4040
4141
Parameters
4242
----------
43-
name : str
43+
name: str
4444
Name of backend
45-
model : Model
45+
model: Model
4646
If None, the model is taken from the `with` context.
47-
vars : list of variables
47+
vars: list of variables
4848
Sampling values will be stored for these variables. If None,
4949
`model.unobserved_RVs` is used.
50-
test_point : dict
50+
test_point: dict
5151
use different test point that might be with changed variables shapes
5252
"""
5353

@@ -113,11 +113,11 @@ def setup(self, draws, chain, sampler_vars=None) -> None:
113113
114114
Parameters
115115
----------
116-
draws : int
116+
draws: int
117117
Expected number of draws
118-
chain : int
118+
chain: int
119119
Chain number
120-
sampler_vars : list of dictionaries (name -> dtype), optional
120+
sampler_vars: list of dictionaries (name -> dtype), optional
121121
Diagnostics / statistics for each sampler. Before passing this
122122
to a backend, you should check, that the `supports_sampler_state`
123123
flag is set.
@@ -130,9 +130,9 @@ def record(self, point, sampler_states=None):
130130
131131
Parameters
132132
----------
133-
point : dict
133+
point: dict
134134
Values mapped to variable names
135-
sampler_states : list of dicts
135+
sampler_states: list of dicts
136136
The diagnostic values for each sampler
137137
"""
138138
raise NotImplementedError
@@ -163,9 +163,9 @@ def get_values(self, varname, burn=0, thin=1):
163163
164164
Parameters
165165
----------
166-
varname : str
167-
burn : int
168-
thin : int
166+
varname: str
167+
burn: int
168+
thin: int
169169
170170
Returns
171171
-------
@@ -178,10 +178,10 @@ def get_sampler_stats(self, stat_name, sampler_idx=None, burn=0, thin=1):
178178
179179
Parameters
180180
----------
181-
stat_name : str
182-
sampler_idx : int or None
183-
burn : int
184-
thin : int
181+
stat_name: str
182+
sampler_idx: int or None
183+
burn: int
184+
thin: int
185185
186186
Returns
187187
-------
@@ -275,13 +275,13 @@ class MultiTrace:
275275
276276
Attributes
277277
----------
278-
nchains : int
278+
nchains: int
279279
Number of chains in the `MultiTrace`.
280-
chains : `List[int]`
280+
chains: `List[int]`
281281
List of chain indices
282-
report : str
282+
report: str
283283
Report on the sampling process.
284-
varnames : `List[str]`
284+
varnames: `List[str]`
285285
List of variable names in the trace(s)
286286
"""
287287

@@ -395,12 +395,12 @@ def add_values(self, vals, overwrite=False) -> None:
395395
396396
Parameters
397397
----------
398-
vals : dict (str: array-like)
398+
vals: dict (str: array-like)
399399
The keys should be the names of the new variables. The values are expected to be
400400
array-like objects. For traces with more than one chain the length of each value
401401
should match the number of total samples already in the trace `(chains * iterations)`,
402402
otherwise a warning is raised.
403-
overwrite : bool
403+
overwrite: bool
404404
If `False` (default) a ValueError is raised if the variable already exists.
405405
Change to `True` to overwrite the values of variables
406406
@@ -441,7 +441,7 @@ def remove_values(self, name):
441441
442442
Parameters
443443
----------
444-
name : str
444+
name: str
445445
Name of the variable to remove. Raises KeyError if the variable is not present
446446
"""
447447
varnames = self.varnames
@@ -461,15 +461,15 @@ def get_values(self, varname, burn=0, thin=1, combine=True, chains=None,
461461
462462
Parameters
463463
----------
464-
varname : str
465-
burn : int
466-
thin : int
467-
combine : bool
464+
varname: str
465+
burn: int
466+
thin: int
467+
combine: bool
468468
If True, results from `chains` will be concatenated.
469-
chains : int or list of ints
469+
chains: int or list of ints
470470
Chains to retrieve. If None, all chains are used. A single
471471
chain value can also be given.
472-
squeeze : bool
472+
squeeze: bool
473473
Return a single array element if the resulting list of
474474
values only has one element. If False, the result will
475475
always be a list of arrays, even if `combine` is True.
@@ -495,10 +495,10 @@ def get_sampler_stats(self, stat_name, burn=0, thin=1, combine=True,
495495
496496
Parameters
497497
----------
498-
stat_name : str
499-
sampler_idx : int or None
500-
burn : int
501-
thin : int
498+
stat_name: str
499+
sampler_idx: int or None
500+
burn: int
501+
thin: int
502502
503503
Returns
504504
-------
@@ -535,8 +535,8 @@ def point(self, idx, chain=None):
535535
536536
Parameters
537537
----------
538-
idx : int
539-
chain : int
538+
idx: int
539+
chain: int
540540
If a chain is not given, the highest chain number is used.
541541
"""
542542
if chain is None:
@@ -548,7 +548,7 @@ def points(self, chains=None):
548548
549549
Parameters
550550
----------
551-
chains : list of int or N
551+
chains: list of int or N
552552
The chains whose points should be inlcuded in the iterator. If
553553
chains is not given, include points from all chains.
554554
"""
@@ -563,7 +563,7 @@ def merge_traces(mtraces: List[MultiTrace]) -> MultiTrace:
563563
564564
Parameters
565565
----------
566-
mtraces : list of MultiTraces
566+
mtraces: list of MultiTraces
567567
Each instance should have unique chain numbers.
568568
569569
Raises

pymc3/backends/hdf5.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ class HDF5(base.BaseTrace):
3434
3535
Parameters
3636
----------
37-
name : str
37+
name: str
3838
Name of backend. This has no meaning for the HDF5 backend.
39-
model : Model
39+
model: Model
4040
If None, the model is taken from the `with` context.
41-
vars : list of variables
41+
vars: list of variables
4242
Sampling values will be stored for these variables. If None,
4343
`model.unobserved_RVs` is used.
44-
test_point : dict
44+
test_point: dict
4545
use different test point that might be with changed variables shapes
4646
"""
4747

@@ -148,11 +148,11 @@ def setup(self, draws, chain, sampler_vars=None):
148148
149149
Parameters
150150
----------
151-
draws : int
151+
draws: int
152152
Expected number of draws
153-
chain : int
153+
chain: int
154154
Chain number
155-
sampler_vars : list of dicts
155+
sampler_vars: list of dicts
156156
Names and dtypes of the variables that are
157157
exported by the samplers.
158158
"""
@@ -228,9 +228,9 @@ def load(name, model=None):
228228
229229
Parameters
230230
----------
231-
name : str
231+
name: str
232232
Path to HDF5 arrays file
233-
model : Model
233+
model: Model
234234
If None, the model is taken from the `with` context.
235235
236236
Returns

pymc3/backends/ndarray.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ def save_trace(trace: MultiTrace, directory: Optional[str]=None, overwrite=False
4141
4242
Parameters
4343
----------
44-
trace : pm.MultiTrace
44+
trace: pm.MultiTrace
4545
trace to save to disk
46-
directory : str (optional)
46+
directory: str (optional)
4747
path to a directory to save the trace
48-
overwrite : bool (default False)
48+
overwrite: bool (default False)
4949
whether to overwrite an existing directory.
5050
5151
Returns
@@ -80,9 +80,9 @@ def load_trace(directory: str, model=None) -> MultiTrace:
8080
8181
Parameters
8282
----------
83-
directory : str
83+
directory: str
8484
Path to a pymc3 serialized trace
85-
model : pm.Model (optional)
85+
model: pm.Model (optional)
8686
Model used to create the trace. Can also be inferred from context
8787
8888
Returns
@@ -182,11 +182,11 @@ class NDArray(base.BaseTrace):
182182
183183
Parameters
184184
----------
185-
name : str
185+
name: str
186186
Name of backend. This has no meaning for the NDArray backend.
187-
model : Model
187+
model: Model
188188
If None, the model is taken from the `with` context.
189-
vars : list of variables
189+
vars: list of variables
190190
Sampling values will be stored for these variables. If None,
191191
`model.unobserved_RVs` is used.
192192
"""
@@ -207,11 +207,11 @@ def setup(self, draws, chain, sampler_vars=None) -> None:
207207
208208
Parameters
209209
----------
210-
draws : int
210+
draws: int
211211
Expected number of draws
212-
chain : int
212+
chain: int
213213
Chain number
214-
sampler_vars : list of dicts
214+
sampler_vars: list of dicts
215215
Names and dtypes of the variables that are
216216
exported by the samplers.
217217
"""
@@ -260,7 +260,7 @@ def record(self, point, sampler_stats=None) -> None:
260260
261261
Parameters
262262
----------
263-
point : dict
263+
point: dict
264264
Values mapped to variable names
265265
"""
266266
for varname, value in zip(self.varnames, self.fn(point)):
@@ -303,9 +303,9 @@ def get_values(self, varname: str, burn=0, thin=1) -> np.ndarray:
303303
304304
Parameters
305305
----------
306-
varname : str
307-
burn : int
308-
thin : int
306+
varname: str
307+
burn: int
308+
thin: int
309309
310310
Returns
311311
-------

pymc3/backends/sqlite.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ class SQLite(base.BaseTrace):
7777
7878
Parameters
7979
----------
80-
name : str
80+
name: str
8181
Name of database file
82-
model : Model
82+
model: Model
8383
If None, the model is taken from the `with` context.
84-
vars : list of variables
84+
vars: list of variables
8585
Sampling values will be stored for these variables. If None,
8686
`model.unobserved_RVs` is used.
87-
test_point : dict
87+
test_point: dict
8888
use different test point that might be with changed variables shapes
8989
"""
9090

@@ -110,9 +110,9 @@ def setup(self, draws, chain):
110110
111111
Parameters
112112
----------
113-
draws : int
113+
draws: int
114114
Expected number of draws
115-
chain : int
115+
chain: int
116116
Chain number
117117
"""
118118
self.db.connect()
@@ -158,7 +158,7 @@ def record(self, point):
158158
159159
Parameters
160160
----------
161-
point : dict
161+
point: dict
162162
Values mapped to variable names
163163
"""
164164
for varname, value in zip(self.varnames, self.fn(point)):
@@ -219,9 +219,9 @@ def get_values(self, varname, burn=0, thin=1):
219219
220220
Parameters
221221
----------
222-
varname : str
223-
burn : int
224-
thin : int
222+
varname: str
223+
burn: int
224+
thin: int
225225
226226
Returns
227227
-------
@@ -313,9 +313,9 @@ def load(name, model=None):
313313
314314
Parameters
315315
----------
316-
name : str
316+
name: str
317317
Path to SQLite database file
318-
model : Model
318+
model: Model
319319
If None, the model is taken from the `with` context.
320320
321321
Returns

0 commit comments

Comments
 (0)