parameters: (cj, newx, dx=1.0, x0=0)
return_statement: return res
docstring: Evaluate a quadratic spline at the new set of points.
  
      `dx` is the old sample-spacing while `x0` was the old origin.  In
      other-words the old-sample points (knot-points) for which the `cj`
      represent spline coefficients were at equally-spaced points of::
  
        oldx = x0 + j*dx  j=0...N-1, with N=len(cj)
  
      Edges are handled using mirror-symmetric boundary conditions.
docstring_summary: Evaluate a quadratic spline at the new set of points.
docstring_tokens: Evaluate a quadratic spline at the new set of points .
function: def qspline1d_eval(cj, newx, dx=1.0, x0=0):
      """Evaluate a quadratic spline at the new set of points.
  
      `dx` is the old sample-spacing while `x0` was the old origin.  In
      other-words the old-sample points (knot-points) for which the `cj`
      represent spline coefficients were at equally-spaced points of::
  
        oldx = x0 + j*dx  j=0...N-1, with N=len(cj)
  
      Edges are handled using mirror-symmetric boundary conditions.
  
      """
      newx = (asarray(newx) - x0) / dx
      res = zeros_like(newx)
      if res.size == 0:
          return res
      N = len(cj)
      cond1 = newx < 0
      cond2 = newx > (N - 1)
      cond3 = ~(cond1 | cond2)
      # handle general mirror-symmetry
      res[cond1] = qspline1d_eval(cj, -newx[cond1])
      res[cond2] = qspline1d_eval(cj, 2 * (N - 1) - newx[cond2])
      newx = newx[cond3]
      if newx.size == 0:
          return res
      result = zeros_like(newx)
      jlower = floor(newx - 1.5).astype(int) + 1
      for i in range(3):
          thisj = jlower + i
          indj = thisj.clip(0, N - 1)  # handle edge cases
          result += cj[indj] * quadratic(newx - thisj)
      res[cond3] = result
      return res
function_tokens: def qspline1d_eval ( cj , newx , dx = 1.0 , x0 = 0 ) : newx = ( asarray ( newx ) - x0 ) / dx res = zeros_like ( newx ) if res . size == 0 : return res N = len ( cj ) cond1 = newx < 0 cond2 = newx > ( N - 1 ) cond3 = ~ ( cond1 | cond2 ) # handle general mirror-symmetry res [ cond1 ] = qspline1d_eval ( cj , - newx [ cond1 ] ) res [ cond2 ] = qspline1d_eval ( cj , 2 * ( N - 1 ) - newx [ cond2 ] ) newx = newx [ cond3 ] if newx . size == 0 : return res result = zeros_like ( newx ) jlower = floor ( newx - 1.5 ) . astype ( int ) + 1 for i in range ( 3 ) : thisj = jlower + i indj = thisj . clip ( 0 , N - 1 ) # handle edge cases result += cj [ indj ] * quadratic ( newx - thisj ) res [ cond3 ] = result return res