From 07bcbde53b6e6427b7d8ad87992af76741652d0e Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Tue, 13 Jun 2017 12:00:12 +0200 Subject: [PATCH] pep8 --- wafo/stats/estimation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wafo/stats/estimation.py b/wafo/stats/estimation.py index 9de33f7..216dc32 100644 --- a/wafo/stats/estimation.py +++ b/wafo/stats/estimation.py @@ -97,11 +97,11 @@ def _exponweib_link(x, logsf, phat, ix): if ix == 0: return - log_cdf / log(-expm1(-xn**c)) if ix == 1: - return log(-log1p(- log_cdf**(1.0 / a))) / log(xn) + return log(-log1p(- log_cdf ** (1.0 / a))) / log(xn) if ix == 2: - return x - (-log1p(- log_cdf**(1.0/a))) ** (1.0 / c) * scale + return x - (-log1p(- log_cdf ** (1.0 / a))) ** (1.0 / c) * scale if ix == 3: - return (x - loc) / (-log1p(- log_cdf**(1.0/a))) ** (1.0 / c) + return (x - loc) / (-log1p(- log_cdf ** (1.0 / a))) ** (1.0 / c) raise IndexError('Index to the fixed parameter is out of bounds') @@ -114,7 +114,7 @@ def _genpareto_link(x, logsf, phat, ix): 'not implemented!') c, loc, scale = phat if c == 0: - return _expon_link(x, logsf, phat[1:], ix-1) + return _expon_link(x, logsf, phat[1:], ix - 1) if ix == 2: # Reorganizing w.r.t.scale, Eq. 4.13 and 4.14, pp 81 in # Coles (2004) gives @@ -140,7 +140,7 @@ def _genextreme_link(x, logsf, phat, ix): 'implemented!') c, loc, scale = phat if c == 0: - return _gumbel_r_link(x, logsf, phat[1:], ix-1) + return _gumbel_r_link(x, logsf, phat[1:], ix - 1) loglog_cdf = log(-log(-expm1(logsf))) return _genpareto_link(x, loglog_cdf, (-c, loc, scale), ix)