Skip to content

Commit b073fd8

Browse files
ricardoV94twiecki
authored andcommitted
Remove user-facing mentions of size in timeseries distributions
1 parent 343a6f5 commit b073fd8

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

pymc/distributions/timeseries.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ class GaussianRandomWalk(distribution.Continuous):
231231
.. warning:: init will be cloned, rendering them independent of the ones passed as input.
232232
233233
steps : int, optional
234-
Number of steps in Gaussian Random Walk (steps > 0). Only needed if size is
235-
used to specify distribution
234+
Number of steps in Gaussian Random Walk (steps > 0). Only needed if shape is not
235+
provided.
236236
"""
237237

238238
rv_op = gaussianrandomwalk
@@ -248,16 +248,14 @@ def __new__(cls, *args, steps=None, **kwargs):
248248
return super().__new__(cls, *args, steps=steps, **kwargs)
249249

250250
@classmethod
251-
def dist(
252-
cls, mu=0.0, sigma=1.0, *, init_dist=None, steps=None, size=None, **kwargs
253-
) -> at.TensorVariable:
251+
def dist(cls, mu=0.0, sigma=1.0, *, init_dist=None, steps=None, **kwargs) -> at.TensorVariable:
254252

255253
mu = at.as_tensor_variable(floatX(mu))
256254
sigma = at.as_tensor_variable(floatX(sigma))
257255

258256
steps = get_steps(
259257
steps=steps,
260-
shape=kwargs.get("shape", None),
258+
shape=kwargs.get("shape"),
261259
step_shape_offset=1,
262260
)
263261
if steps is None:
@@ -292,7 +290,7 @@ def dist(
292290
# Ignores logprob of init var because that's accounted for in the logp method
293291
init_dist = ignore_logprob(init_dist)
294292

295-
return super().dist([mu, sigma, init_dist, steps], size=size, **kwargs)
293+
return super().dist([mu, sigma, init_dist, steps], **kwargs)
296294

297295
def moment(rv, size, mu, sigma, init_dist, steps):
298296
grw_moment = at.zeros_like(rv)
@@ -384,8 +382,7 @@ class AR(SymbolicDistribution):
384382
Order of the AR process. Inferred from length of the last dimension of rho, if
385383
possible. ar_order = rho.shape[-1] if constant else rho.shape[-1] - 1
386384
steps : int, optional
387-
Number of steps in AR process (steps > 0). Only needed if size is used to
388-
specify distribution
385+
Number of steps in AR process (steps > 0). Only needed if shape is not provided.
389386
390387
Notes
391388
-----

0 commit comments

Comments
 (0)