docs: def basis(self, n):
          """
          Chebyshev basis functions T_n.
          """
          if n == 0:
              return self(np.array([1.]))
          vals = np.ones(n+1)
          vals[1::2] = -1
          return self(vals)