Skip to content

Review docstrings checkmarcked as best practice #5919

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 3 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions docs/source/api/aesaraf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Aesara utils
.. autosummary::
:toctree: generated/

compile_pymc
gradient
hessian
hessian_diag
Expand Down
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"SMC_kernel": ":ref:`SMC Kernel <smc_kernels>`",
"Aesara_Op": ":class:`Aesara Op <aesara.graph.op.Op>`",
"tensor_like": ":term:`tensor_like`",
"numpy_Generator": ":class:`~numpy.random.Generator`",
"Distribution": ":ref:`Distribution <api_distributions>`",
}

# Show the documentation of __init__ and the class docstring
Expand Down
4 changes: 0 additions & 4 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -1653,10 +1653,6 @@ class AsymmetricLaplace(Continuous):
Location parameter.
b : tensor_like of float
Scale parameter (b > 0).

See Also:
--------
`Reference <https://en.wikipedia.org/wiki/Asymmetric_Laplace_distribution>`_
"""
rv_op = asymmetriclaplace

Expand Down
6 changes: 3 additions & 3 deletions pymc/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,11 +988,11 @@ class HyperGeometric(Discrete):

Parameters
----------
N : tensor_like of integer
N : tensor_like of int
Total size of the population (N > 0)
k : tensor_like of integer
k : tensor_like of int
Number of successful individuals in the population (0 <= k <= N)
n : tensor_like of integer
n : tensor_like of int
Number of samples drawn from the population (0 <= n <= N)
"""

Expand Down
15 changes: 8 additions & 7 deletions pymc/distributions/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,17 @@ def rng_fn(


class GaussianRandomWalk(distribution.Continuous):
r"""Random Walk with Normal innovations
r"""Random Walk with Normal innovations.

Parameters
----------
mu : tensor_like of float
innovation drift, defaults to 0.0
sigma : tensor_like of float, optional
sigma > 0, innovation standard deviation, defaults to 1.0
init_dist : unnamed distribution
Univariate distribution of the initial value, created with the `.dist()` API.
mu : tensor_like of float, default 0
innovation drift
sigma : tensor_like of float, default 1
sigma > 0, innovation standard deviation.
init_dist : Distribution
Unnamed univariate distribution of the initial value. Unnamed refers to distributions
created with the ``.dist()`` API.

.. warning:: init will be cloned, rendering them independent of the ones passed as input.

Expand Down
6 changes: 3 additions & 3 deletions pymc/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2277,14 +2277,14 @@ def draw(

Parameters
----------
vars : Variable or iterable of Variable
vars : TensorVariable or iterable of TensorVariable
A variable or a list of variables for which to draw samples.
draws : int, default 1
Number of samples needed to draw.
random_seed : int, RandomState or Generator, optional
random_seed : int, RandomState or numpy_Generator, optional
Seed for the random number generator.
**kwargs : dict, optional
Keyword arguments for :func:`pymc.aesara.compile_pymc`.
Keyword arguments for :func:`pymc.aesaraf.compile_pymc`.

Returns
-------
Expand Down