interpolate.tests.test_bsplines

Module Contents

Functions

test_knots_multiplicity()
_naive_B(x,k,i,t) Naive way to compute B-spline basis functions. Useful only for testing!
_naive_eval(x,t,c,k) Naive B-spline evaluation. Useful only for testing!
_naive_eval_2(x,t,c,k) Naive B-spline evaluation, another way.
_sum_basis_elements(x,t,c,k)
B_012(x) A linear B-spline function B(x | 0, 1, 2).
B_0123(x,der=0) A quadratic B-spline function B(x | 0, 1, 2, 3).
_make_random_spline(n=35,k=3)
_make_multiples(b) Increase knot multiplicity.
make_interp_full_matr(x,y,t,k) Assemble an spline order k with knots t to interpolate
make_interp_per_full_matr(x,y,t,k)
make_lsq_full_matrix(x,y,t,k=3) Make the least-square spline, full matrices.
class TestBSpline
test_ctor()
test_tck()
test_degree_0()
test_degree_1()
test_bernstein()
test_rndm_naive_eval()
test_rndm_splev()
test_rndm_splrep()
test_rndm_unity()
test_vectorization()
test_len_c()
test_endpoints()
test_continuity()
test_extrap()
test_default_extrap()
test_periodic_extrap()
test_ppoly()
test_derivative_rndm()
test_derivative_jumps()
test_basis_element_quadratic()
test_basis_element_rndm()
test_cmplx()
test_nan()
test_derivative_method()
test_antiderivative_method()
test_integral()
test_integrate_ppoly()
test_subclassing()
test_axis()
test_knots_multiplicity()
_naive_B(x, k, i, t)

Naive way to compute B-spline basis functions. Useful only for testing! computes B(x; t[i],…, t[i+k+1])

_naive_eval(x, t, c, k)

Naive B-spline evaluation. Useful only for testing!

_naive_eval_2(x, t, c, k)

Naive B-spline evaluation, another way.

_sum_basis_elements(x, t, c, k)
B_012(x)

A linear B-spline function B(x | 0, 1, 2).

B_0123(x, der=0)

A quadratic B-spline function B(x | 0, 1, 2, 3).

_make_random_spline(n=35, k=3)
_make_multiples(b)

Increase knot multiplicity.

class TestInterop
setup_method()
test_splev()
test_splrep()
test_splrep_errors()
test_splprep()
test_splprep_errors()
test_sproot()
test_splint()
test_splder()
test_splantider()
test_insert()
class TestInterp
test_order_0()
test_linear()
test_not_a_knot()
test_quadratic_deriv()
test_cubic_deriv()
test_quintic_derivs()
test_cubic_deriv_unstable()
test_knots_not_data_sites()
test_minimum_points_and_deriv()
test_complex()
test_int_xy()
test_sliced_input()
test_check_finite()
test_multiple_rhs()
test_shapes()
test_full_matrix()
make_interp_full_matr(x, y, t, k)

Assemble an spline order k with knots t to interpolate y(x) using full matrices. Not-a-knot BC only.

This routine is here for testing only (even though it’s functional).

make_interp_per_full_matr(x, y, t, k)
make_lsq_full_matrix(x, y, t, k=3)

Make the least-square spline, full matrices.

class TestLSQ
test_lstsq()
test_weights()
test_multiple_rhs()
test_complex()
test_int_xy()
test_sliced_input()
test_checkfinite()