diff --git a/nifty5/library/inverse_gamma_operator.py b/nifty5/library/inverse_gamma_operator.py index 98e04922c454c5dd9cf79596f188b77b6e03f939..640a29c12223d769d7eadba979a1db14c8de9d84 100644 --- a/nifty5/library/inverse_gamma_operator.py +++ b/nifty5/library/inverse_gamma_operator.py @@ -30,8 +30,9 @@ class InverseGammaOperator(Operator): The pdf of the inverse gamma distribution is defined as follows: - .. math :: - \\frac{q^\\alpha}{\\Gamma(\\alpha)}x^{-\\alpha -1}\\exp \\left(-\\frac{q}{x}\\right) + .. math:: + \\frac{q^\\alpha}{\\Gamma(\\alpha)}x^{-\\alpha -1} + \\exp \\left(-\\frac{q}{x}\\right) That means that for large x the pdf falls off like :math:x^(-\\alpha -1). The mean of the pdf is at :math:q / (\\alpha - 1) if :math:\\alpha > 1. @@ -54,7 +55,8 @@ class InverseGammaOperator(Operator): """ def __init__(self, domain, alpha, q, delta=0.001): self._domain = self._target = DomainTuple.make(domain) - self._alpha, self._q, self._delta = float(alpha), float(q), float(delta) + self._alpha, self._q, self._delta = \ + float(alpha), float(q), float(delta) self._xmin, self._xmax = -8.2, 8.2 # Precompute xs = np.arange(self._xmin, self._xmax+2*delta, delta)