Skip to content
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

Updated pymc.InverseGamma docstring #5499

Merged
merged 1 commit into from
Feb 19, 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
24 changes: 15 additions & 9 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ def logcdf(value, alpha, inv_beta):

Parameters
----------
value : tensor_like
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`.
Expand Down Expand Up @@ -2372,6 +2372,7 @@ class InverseGamma(PositiveContinuous):
\exp\left(\frac{-\beta}{x}\right)

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand All @@ -2398,13 +2399,13 @@ class InverseGamma(PositiveContinuous):

Parameters
----------
alpha: float
alpha : tensor_like of float, optional
Shape parameter (alpha > 0).
beta: float
beta : tensor_like of float, optional
Scale parameter (beta > 0).
mu: float
mu : tensor_like of float, optional
Alternative shape parameter (mu > 0).
sigma: float
sigma : tensor_like of float, optional
Alternative scale parameter (sigma > 0).
"""
rv_op = invgamma
Expand Down Expand Up @@ -2460,14 +2461,19 @@ def _distr_parameters_for_repr(self):

def logcdf(value, alpha, beta):
"""
Compute the log of the cumulative distribution function for Inverse Gamma distribution
at the specified value.
Compute the log of the cumulative distribution function for Inverse Gamma
distribution at the specified value.

Parameters
----------
value: numeric or np.ndarray or aesara.tensor
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 Aesara tensor.
values are desired the values must be provided in a numpy array or Aesara
tensor.
alpha : tensor_like of float
Shape parameter (alpha > 0).
beta : tensor_like of float
Scale parameter (beta > 0).

Returns
-------
Expand Down