5.2.1. numdifftools.tests package

5.2.1.1. numdifftools.tests.hamiltonian module

Created on Jun 25, 2016

@author: pab

class ClassicalHamiltonian[source]

Bases: object

Hamiltonian

Parameters
nscalar

number of ions in the chain

wscalar

angular trap frequency

Cscalar

Coulomb constant times the electronic charge in SI units.

mscalar

the mass of a single trapped ion in the chain

initialposition()[source]

Defines initial position as an estimate for the minimize process.

normal_modes(eigenvalues)[source]

Return normal modes

Computed eigenvalues of the matrix Vx are of the form

(normal_modes)**2*m.

potential(positionvector)[source]

Return potential

Parameters
positionvector: 1-d array (vector) of length n

positions of the n ions

run_hamiltonian(hessian, verbose=True)[source]

5.2.1.2. numdifftools.tests.test_extrapolation module

class TestExtrapolation[source]

Bases: object

setup_method()[source]
test_dea3_on_trapz_sin()[source]
test_dea_on_trapz_sin()[source]
test_epsal()[source]
test_richardson()[source]
class TestRichardson[source]

Bases: object

setup_method()[source]
test_order_step_combinations()[source]

5.2.1.3. numdifftools.tests.test_fornberg module

class ExampleFunctions[source]

Bases: object

static fun0(z)[source]
static fun1(z)[source]
static fun10(z)[source]
static fun11(z)[source]
static fun12(z)[source]
static fun13(z)[source]
static fun14(z)[source]
static fun2(z)[source]
static fun3(z)[source]
static fun4(z)[source]
static fun5(z)[source]
static fun6(z)[source]
static fun7(z)[source]
static fun8(z)[source]
static fun9(z)[source]
test_all_weights()[source]
test_fd_derivative()[source]
test_high_order_derivative() None[source]
test_low_order_derivative_on_example_functions()[source]
test_weights()[source]

5.2.1.4. numdifftools.tests.test_limits module

Created on 28. aug. 2015

@author: pab

class TestCStepGenerator[source]

Bases: object

static test_default_base_step()[source]
static test_default_generator()[source]
static test_fixed_base_step()[source]
class TestLimit[source]

Bases: object

test_derivative_of_cos()[source]
test_difficult_limit()[source]
test_residue_1_div_1_minus_exp_x()[source]
test_sinx_div_x()[source]
class TestResidue[source]

Bases: object

test_residue_1_div_1_minus_exp_x()[source]
test_residue_1_div_sin_x2()[source]

5.2.1.5. numdifftools.tests.test_multicomplex module

Created on 22. apr. 2015

@author: pab

class TestBicomplex[source]

Bases: object

static test_add()[source]
static test_arccos()[source]
static test_arcsin()[source]
static test_arg_c()[source]
static test_assign()[source]
test_conjugate()[source]
static test_cos()[source]
static test_der_abs()[source]
static test_der_arccos()[source]
static test_der_arccosh()[source]
static test_der_arctan()[source]
static test_der_cos()[source]
static test_der_log()[source]
static test_division()[source]
static test_dot()[source]
static test_eq()[source]
test_flat()[source]
static test_ge()[source]
static test_gt()[source]
test_init()[source]
static test_le()[source]
static test_lt()[source]
static test_mod_c()[source]
static test_multiplication()[source]
test_neg()[source]
test_norm()[source]
static test_pow()[source]
test_rdivision()[source]

Test issue # 39

test_repr()[source]
static test_rpow()[source]
static test_rsub()[source]
test_shape()[source]
static test_sub()[source]
static test_subsref()[source]
class TestDerivative[source]

Bases: object

static test_all_first_derivatives()[source]
static test_all_second_derivatives()[source]

5.2.1.6. numdifftools.tests.test_nd_algopy module

class TestDerivative[source]

Bases: object

static test_derivative_cube()[source]

Test for Issue 7

static test_derivative_exp() None[source]
static test_derivative_on_log() None[source]
test_derivative_on_sinh() None[source]
static test_derivative_sin()[source]
static test_directional_diff()[source]
static test_fun_with_additional_parameters()[source]

Test for issue #9

static test_high_order_derivative_cos()[source]
class TestGradient[source]

Bases: object

static test_on_scalar_function()[source]
class TestHessdiag[source]

Bases: object

static test_forward()[source]
static test_reverse()[source]
class TestHessian[source]

Bases: object

static test_hessian_cos_x_y__at_0_0()[source]
test_run_hamiltonian()[source]
class TestJacobian[source]

Bases: object

static test_issue_25()[source]
static test_on_matrix_valued_function()[source]
static test_on_scalar_function()[source]
test_on_vector_valued_function()[source]
static test_scalar_to_vector() None[source]

5.2.1.7. numdifftools.tests.test_nd_scipy module

class TestGradient[source]

Bases: object

static test_on_scalar_function()[source]
class TestJacobian[source]

Bases: object

test_issue_25()[source]
test_on_matrix_valued_function()[source]
static test_on_scalar_function()[source]
test_on_vector_valued_function()[source]
static test_scalar_to_vector() None[source]

5.2.1.8. numdifftools.tests.test_numdifftools module

Test functions for numdifftools module

class TestDerivative[source]

Bases: object

test_backward_derivative_on_sinh()[source]
test_central_and_forward_derivative_on_log()[source]
static test_default_scale()[source]
static test_derivative_cube()[source]

Test for Issue 7

static test_derivative_exp()[source]
static test_derivative_of_cos_x() None[source]
static test_derivative_sin()[source]
static test_derivative_with_step_options()[source]
static test_directional_diff()[source]
static test_fun_with_additional_parameters()[source]

Test for issue #9

static test_high_order_derivative_cos()[source]
test_infinite_functions()[source]
class TestGradient[source]

Bases: object

static test_directional_diff()[source]
static test_gradient()[source]
static test_gradient_fulloutput()[source]

Fix issue#52:

Gradient tries to apply squeeze to the output tuple containing both the result and the full_output object.

static test_issue_39()[source]

Test that checks float/Bicomplex works

class TestHessdiag[source]

Bases: object

test_complex()[source]
test_default_step()[source]
test_fixed_step() None[source]
class TestHessian[source]

Bases: object

test_complex_hessian_issue_35()[source]
static test_hessian_cos_x_y_at_0_0()[source]
test_run_hamiltonian()[source]
class TestJacobian[source]

Bases: object

static test_issue_25()[source]
static test_issue_27a()[source]

Test for memory-error

static test_issue_27b()[source]

Test for memory-error

static test_jacobian_fulloutput()[source]

test

static test_on_matrix_valued_function()[source]
static test_on_scalar_function()[source]
static test_on_vector_valued_function()[source]
static test_scalar_to_vector() None[source]
class TestRichardson[source]

Bases: object

static test_central_forward_backward()[source]
static test_complex()[source]

5.2.1.9. numdifftools.tests.test_scripts module

test__find_default_scale_run_all_benchmarks()[source]
test_profile_numdifftools_main()[source]
test_profile_numdifftools_profile_hessian()[source]
test_run_gradient_and_hessian_benchmarks()[source]

5.2.1.10. numdifftools.tests.test_step_generators module

test__min_step_generator_with_step_nom1()[source]
test_default_max_step_generator()[source]
test_max_step_generator_default_base_step()[source]
test_max_step_generator_with_base_step01()[source]
test_min_step_generator_default_base_step()[source]
test_min_step_generator_with_base_step01()[source]
test_min_step_generator_with_step_ratio4()[source]