Updated doctest + codestyle

master
Per A Brodtkorb 8 years ago
parent d5f440f5bf
commit 2eac870eeb

@ -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

@ -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)

Loading…
Cancel
Save