From 2eac870eebeaf8706a1e599ab24b78900acdbd61 Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Mon, 29 Aug 2016 01:52:15 +0200 Subject: [PATCH] Updated doctest + codestyle --- wafo/containers.py | 2 +- wafo/interpolate.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wafo/containers.py b/wafo/containers.py index 661b165..34986a3 100644 --- a/wafo/containers.py +++ b/wafo/containers.py @@ -168,7 +168,7 @@ class PlotData(object): >>> ci = PlotData(np.vstack((y*.9, y*1.1)).T, x) >>> d = PlotData(y, x, children=[ci]) >>> d.integrate(0, np.pi/2, return_ci=True) - array([ 0.99940055, 0.85543644, 1.04553343]) + array([ 0.99940055, 0.89946049, 1.0993406 ]) >>> np.allclose(d.integrate(0, 5, return_ci=True), ... d.integrate(return_ci=True)) True diff --git a/wafo/interpolate.py b/wafo/interpolate.py index b3526e0..105ddd3 100644 --- a/wafo/interpolate.py +++ b/wafo/interpolate.py @@ -618,7 +618,8 @@ class SmoothSpline(PPform): return coefs, x - def _compute_u(self, p, D, dydx, dx, dx1, n): + @staticmethod + def _compute_u(p, D, dydx, dx, dx1, n): if p is None or p != 0: data = [dx[1:n - 1], 2 * (dx[:n - 2] + dx[1:n - 1]), dx[:n - 2]] R = sparse.spdiags(data, [-1, 0, 1], n - 2, n - 2) @@ -1345,7 +1346,7 @@ def test_pp(): def test_docstrings(): import doctest - print('Testing docstrings in %s' % __file__) + print('Testing docstrings in {}'.formate(__file__)) doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)