From a332af2875c7bfd28a184d787ab1c46956280d99 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Thu, 24 Jan 2019 10:01:16 +0100 Subject: [PATCH] cosmetics --- nifty5/library/inverse_gamma_operator.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nifty5/library/inverse_gamma_operator.py b/nifty5/library/inverse_gamma_operator.py index 98e04922..640a29c1 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) -- GitLab