def test_interpolation():
 (t0, k0) = (0, np.array([5.0]))
 results = _compute_fixed_length_solns(model, t0, k0)
 for (integrator, numeric_solution) in results.items():
  (N, T) = (1000, numeric_solution[:, 0][(-1)])
  ti = np.linspace(t0, T, N)
  interp_solution = model.interpolate(numeric_solution, ti, k=3, ext=2)
  analytic_solution = solow_analytic_solution(ti, k0, *valid_params)
  np.testing.assert_allclose(interp_solution, analytic_solution)

def test_interpolation ( ) : ( t0 , k0 ) = ( 0 , np . array ( [ 5.0 ] ) ) results = _compute_fixed_length_solns ( model , t0 , k0 ) for ( integrator , numeric_solution ) in results . items ( ) : ( N , T ) = ( 1000 , numeric_solution [ : , 0 ] [ ( - 1 ) ] ) ti = np . linspace ( t0 , T , N ) interp_solution = model . interpolate ( numeric_solution , ti , k = 3 , ext = 2 ) analytic_solution = solow_analytic_solution ( ti , k0 , * valid_params ) np . testing . assert_allclose ( interp_solution , analytic_solution )
test interpolation option .