diff --git a/wafo/misc.py b/wafo/misc.py index 2e399be..c8b888a 100644 --- a/wafo/misc.py +++ b/wafo/misc.py @@ -447,7 +447,7 @@ def spaceline(start_point, stop_point, num=10): ''' num = int(num) start, stop = np.atleast_1d(start_point, stop_point) - delta = (stop - start) / float(num - 1) + delta = (stop - start) / float(num - 1) return np.array([start + n * delta for n in range(num)]) @@ -2487,7 +2487,8 @@ def _make_bars(limits, bin_): # pylint: disable=redefined-builtin -def _histogram(data, bins=None, range=None, normed=False, weights=None, density=None): # @ReservedAssignment +def _histogram(data, bins=None, range=None, normed=False, weights=None, # @ReservedAssignment + density=None): """ Example ------- diff --git a/wafo/spectrum/core.py b/wafo/spectrum/core.py index 4867061..b4b0590 100644 --- a/wafo/spectrum/core.py +++ b/wafo/spectrum/core.py @@ -3722,8 +3722,8 @@ class SpecData1D(PlotData): # Cov(Hm0,Tm01) Cov(Hm0,Tm02) Cov(Tm01,Tm02) S0 = r_[2. / (sqrt(m[0]) * m[1]) * (mij[0] - m[0] * mij[1] / m[1]), 1. / sqrt(m[2]) * (mij[0] / m[0] - mij[2] / m[2]), - 1. / (2 * m[1]) * sqrt(m[0] / m[2]) * (mij[0] / m[0] - mij[2] / - m[2] - mij[1] / m[1] + m[0] * mij[3] / (m[1] * m[2]))] + 1. / (2 * m[1]) * sqrt(m[0] / m[2]) + * (mij[0] / m[0] - mij[2] / m[2] - mij[1] / m[1] + m[0] * mij[3] / (m[1] * m[2]))] R1 = ones((15, 15)) R1[:, :] = nan diff --git a/wafo/spectrum/models.py b/wafo/spectrum/models.py index 0205567..8799772 100644 --- a/wafo/spectrum/models.py +++ b/wafo/spectrum/models.py @@ -1313,8 +1313,7 @@ class Wallop(Bretschneider): wp = 2. * pi / Tp kp = w2k(wp, 0, inf)[0] # wavenumber at peak frequency Lp = 2. * pi / kp # wave length at the peak frequency - N = np.abs((log(2. * pi ** 2.) + 2 * log(Hm0 / 4) - - 2.0 * log(Lp)) / log(2)) + N = np.abs((log(2. * pi ** 2.) + 2 * log(Hm0 / 4) - 2.0 * log(Lp)) / log(2)) super(Wallop, self).__init__(Hm0, Tp, N, M, chk_seastate) @@ -2135,5 +2134,6 @@ def main(): else: test_docstrings() + if __name__ == '__main__': main()