class_docstr: Smoke tests (with a few asserts) for fitpack routines -- mostly
  check that they are runnable
class_docstr_tok: ["Smoke","tests","(","with","a","few","asserts",")","for","fitpack","routines","--","mostly","check","that","they","are","runnable"]
code: def check_1(
      self,
      f=f1,
      per=0,
      s=0,
      a=0,
      b=2 * pi,
      N=20,
      at=0,
      xb=None,
      xe=None,
  ):
      if xb is None:
          xb = a
      if xe is None:
          xe = b
      x = a + (b - a) * arange(N + 1, dtype=float) / float(N)  # nodes
      x1 = a + (b - a) * arange(1, N, dtype=float) / float(
          N - 1
      )  # middle points of the nodes
      v, v1 = f(x), f(x1)
      nk = []
  
      def err_est(k, d):
          # Assume f has all derivatives < 1
          h = 1.0 / float(N)
          tol = 5 * h ** (0.75 * (k - d))
          if s > 0:
              tol += 1e5 * s
          return tol
  
      for k in range(1, 6):
          tck = splrep(x, v, s=s, per=per, k=k, xe=xe)
          if at:
              t = tck[0][k:-k]
          else:
              t = x1
          nd = []
          for d in range(k + 1):
              tol = err_est(k, d)
              err = norm2(f(t, d) - splev(t, tck, d)) / norm2(f(t, d))
              assert_(err < tol, (k, d, err, tol))
              nd.append((err, tol))
          nk.append(nd)
      put(
          "\nf = %s  s=S_k(x;t,c)  x in [%s, %s] > [%s, %s]"
          % (
              f(None),
              repr(round(xb, 3)),
              repr(round(xe, 3)),
              repr(round(a, 3)),
              repr(round(b, 3)),
          )
      )
      if at:
          str = "at knots"
      else:
          str = "at the middle of nodes"
      put(" per=%d s=%s Evaluation %s" % (per, repr(s), str))
      put(" k :  |f-s|^2  |f'-s'| |f''-.. |f'''-. |f''''- |f'''''")
      k = 1
      for l in nk:
          put(" %d : " % k)
          for r in l:
              put(" %.1e  %.1e" % r)
          put("\n")
          k = k + 1
  
imports: from __future__ import division, print_function, absolute_import
  import os
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_, assert_almost_equal, assert_array_almost_equal
  from pytest import raises
  from numpy import array, asarray, pi, sin, cos, arange, dot, ravel, sqrt, round
  from scipy import interpolate
  from scipy.interpolate.fitpack import splrep, splev, bisplrep, bisplev, sproot, splprep, splint, spalde, splder, splantider, insert, dblint
  from scipy.interpolate.dfitpack import regrid_smth
label_desc: Use image node_id 1 for calling the TestSmokeTests obj's underlying member method code with example usage: obj.check_1(f, per, s, a, b, N, at, xb, xe) and returns: tol