From b46d9873664afcea76261315dfdf40a08a55d9ff Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Sun, 9 Jul 2017 21:18:43 +0200 Subject: [PATCH] pep8 --- wafo/spectrum/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wafo/spectrum/models.py b/wafo/spectrum/models.py index c56a578..8f92ee2 100644 --- a/wafo/spectrum/models.py +++ b/wafo/spectrum/models.py @@ -1519,8 +1519,8 @@ class Spreading(object): @method.setter def method(self, method): - methods = {'n': None, 'm': 'mitsuyasu', 'd': 'donelan', 'b':'banner', - 0: None, 1: 'mitsuyasu', 2: 'donelan', 3:'banner', + methods = {'n': None, 'm': 'mitsuyasu', 'd': 'donelan', 'b': 'banner', + 0: None, 1: 'mitsuyasu', 2: 'donelan', 3: 'banner', None: None} m = method if not isinstance(method, str) else method[0].lower() try: @@ -1987,7 +1987,7 @@ class Spreading(object): @staticmethod def _check_theta(theta): L = abs(theta[-1] - theta[0]) - if abs(L - np.pi) > _EPS: + if abs(L - 2 * np.pi) > _EPS: raise ValueError('theta must cover all angles -pi -> pi') nt = len(theta) if nt < 40: