Skip to content

Updated pymc.Normal docstring #5487

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 4 commits into from
Feb 19, 2022
Merged
Changes from 3 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
15 changes: 11 additions & 4 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ class Normal(Continuous):
\tau = \dfrac{1}{\sigma^2}

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand All @@ -524,12 +525,14 @@ class Normal(Continuous):

Parameters
----------
mu: float
mu : tensor_like of float, default 0
Mean.
sigma: float
sigma : tensor_like of float, optional
Standard deviation (sigma > 0) (only required if tau is not specified).
tau: float
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).
Defaults to 1 if neither sigma nor tau is specified.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Defaults to 1 if neither sigma nor tau is specified.

only one of tau or sigma are used, I think it's better to leave the explanation as no value for tau or sigma -> sigma=1 (tau=1 is equivalent to sigma=1 but that might still be confusing for many pymc users)


Examples
--------
Expand Down Expand Up @@ -573,9 +576,13 @@ def logcdf(value, mu, sigma):

Parameters
----------
value: numeric or np.ndarray or `TensorVariable`
value : tensor_like of float
Value(s) for which log CDF is calculated. If the log CDF for multiple
values are desired the values must be provided in a numpy array or `TensorVariable`.
mu : tensor_like of float
Mean.
sigma : tensor_like of float
Standard deviation (sigma > 0).

Returns
-------
Expand Down