Skip to content

Update pymc.TruncatedNormal docstring #5546

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 7 commits into from
Mar 12, 2022
Merged
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
19 changes: 11 additions & 8 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ class TruncatedNormal(BoundedContinuous):


.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -673,13 +674,16 @@ class TruncatedNormal(BoundedContinuous):

Parameters
----------
mu: float
mu : tensor_like of float, default 0
Mean.
sigma: float
Standard deviation (sigma > 0).
lower: float (optional)
sigma : tensor_like of float, optional
Standard deviation (sigma > 0) (only required if tau is not specified).
Defaults to 1 if neither sigma nor tau is specified.
tau : tensor_like of float, optional
Precision (tau > 0) (only required if sigma is not specified).
lower : tensor_like of float, default - numpy.inf
Left bound.
upper: float (optional)
upper : tensor_like of float, default numpy.inf
Right bound.

Examples
Expand Down Expand Up @@ -709,7 +713,6 @@ def dist(
sd: Optional[DIST_PARAMETER_TYPES] = None,
lower: Optional[DIST_PARAMETER_TYPES] = None,
upper: Optional[DIST_PARAMETER_TYPES] = None,
transform: str = "auto",
*args,
**kwargs,
) -> RandomVariable:
Expand Down Expand Up @@ -762,9 +765,9 @@ def logp(

Parameters
----------
value: numeric
value : tensor_like of float
Value(s) for which log-probability is calculated. If the log probabilities for multiple
values are desired the values must be provided in a numpy array or Aesara tensor
values are desired the values must be provided in a numpy array or Aesara tensor.

Returns
-------
Expand Down