From 0332c44562405286aa76ea33a7c94b3f01dc2224 Mon Sep 17 00:00:00 2001 From: pbrod Date: Fri, 27 May 2016 15:16:21 +0200 Subject: [PATCH] updated .travis.yml --- .travis.yml | 3 ++- wafo/objects.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 976a9d2..8d33ce3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,8 @@ before_install: - sudo apt-get install gfortran # Install packages install: - - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pytest matplotlib nose pytest-pep8 pytest-cov mpmath pillow + - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pytest matplotlib nose pytest-pep8 pytest-cov mpmath + - pip install pillow - pip install numdifftools - pip install coveralls - pip install codecov diff --git a/wafo/objects.py b/wafo/objects.py index bba1a17..d61728d 100644 --- a/wafo/objects.py +++ b/wafo/objects.py @@ -91,8 +91,8 @@ class LevelCrossings(PlotData): options.update(**kwds) super(LevelCrossings, self).__init__(*args, **options) self.intensity = kwds.get('intensity', False) - self.sigma = kwds.get('sigma', None) - self.mean = kwds.get('mean', None) + self.sigma = kwds.get('sigma') + self.mean = kwds.get('mean') # self.setplotter(plotmethod='step') icmax = self.data.argmax() @@ -734,7 +734,7 @@ class CyclePairs(PlotData): else: defnr = kind - if ((defnr < 0) or (defnr > 3)): + if defnr not in [1, 2, 3, 4]: raise ValueError('kind must be one of (1,2,3,4).') m, M = self.get_minima_and_maxima() @@ -1230,7 +1230,7 @@ class TimeSeries(PlotData): dt = self.sampling_period() yy = self.data.ravel() - if not (tr is None): + if tr is not None: yy = tr.dat2gauss(yy) yy = detrend(yy) if hasattr(detrend, '__call__') else yy n = len(yy)