numdifftools.tests package

Submodules

numdifftools.tests.conftest module

Dummy conftest.py for git_numdifftools.

If you don’t know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html

numdifftools.tests.test_hessian module

class numdifftools.tests.test_hessian.TestHessian(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_hessian()[source]
class numdifftools.tests.test_hessian.classicalHamiltonian[source]
Parameters:

N : scalar

number of ions in the chain

w : scalar

angular trap frequency

C : scalar

Coulomb constant times the electronic charge in SI units.

m : scalar

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]

the computed eigenvalues of the matrix Vx are of the form (normal_modes)2*m.

potential(positionvector)[source]

positionvector is an 1-d array (vector) of length N that contains the positions of the N ions

numdifftools.tests.test_limits module

Created on 28. aug. 2015

@author: pab

class numdifftools.tests.test_limits.TestLimit(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_derivative_of_cos()
test_difficult_limit()
test_residue()
test_sinx_divx()

numdifftools.tests.test_multicomplex module

Created on 22. apr. 2015

@author: pab

class numdifftools.tests.test_multicomplex.BicomplexTester(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_add()
test_arccos()
test_arcsin()
test_arg_c()
test_assign()
test_cos()
test_der_abs()
test_der_arccos()
test_der_arctan()
test_der_cos()
test_der_log()
test_division()
test_dot()
test_init()
test_multiplication()
test_neg()
test_pow()
test_repr()
test_rpow()
test_rsub()
test_sub()
test_subsref()
class numdifftools.tests.test_multicomplex.DerivativeTester(methodName='runTest')[source]

Bases: unittest.case.TestCase

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

numdifftools.tests.test_nd_algopy module

class numdifftools.tests.test_nd_algopy.TestDerivative(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_derivative_cube()

Test for Issue 7

test_derivative_exp()
test_derivative_on_log()
test_derivative_on_sinh()
test_derivative_sin()
test_fun_with_additional_parameters()

Test for issue #9

test_high_order_derivative_cos()
class numdifftools.tests.test_nd_algopy.TestGradient(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_on_scalar_function()
class numdifftools.tests.test_nd_algopy.TestHessdiag(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_forward()
test_reverse()
class numdifftools.tests.test_nd_algopy.TestHessian(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_hessian_cosIx_yI_at_I0_0I()
test_run_hamiltonian()
class numdifftools.tests.test_nd_algopy.TestJacobian(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_on_scalar_function()
test_on_vector_valued_function()
class numdifftools.tests.test_nd_algopy.classicalHamiltonian[source]
Parameters:

N : scalar

number of ions in the chain

w : scalar

angular trap frequency

C : scalar

Coulomb constant times the electronic charge in SI units.

m : scalar

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]

the computed eigenvalues of the matrix Vx are of the form (normal_modes)2*m.

potential(positionvector)[source]

positionvector is an 1-d array (vector) of length N that contains the positions of the N ions

numdifftools.tests.test_numdifftools module

Test functions for numdifftools module

class numdifftools.tests.test_numdifftools.TestDerivative(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_backward_derivative_on_sinh()
test_central_and_forward_derivative_on_log()
test_default_scale()
test_derivative_cube()

Test for Issue 7

test_derivative_exp()
test_derivative_of_cos_x()
test_derivative_sin()
test_fun_with_additional_parameters()

Test for issue #9

test_high_order_derivative_cos()
test_infinite_functions()
class numdifftools.tests.test_numdifftools.TestFornbergWeights(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_weights()
class numdifftools.tests.test_numdifftools.TestGlobalFunctions(methodName='runTest')[source]

Bases: unittest.case.TestCase

testdea3()
class numdifftools.tests.test_numdifftools.TestGradient(methodName='runTest')[source]

Bases: unittest.case.TestCase

testgradient()
class numdifftools.tests.test_numdifftools.TestHessdiag(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_complex()
test_default_step()
test_fixed_step()
class numdifftools.tests.test_numdifftools.TestHessian(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_hessian_cosIx_yI_at_I0_0I()
class numdifftools.tests.test_numdifftools.TestJacobian(methodName='runTest')[source]

Bases: unittest.case.TestCase

testjacobian()
class numdifftools.tests.test_numdifftools.TestRichardson(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_central()
test_complex()
test_forward_backward()
test_order_step_combinations()
class numdifftools.tests.test_numdifftools.TestStepGenerator(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_base_step()
test_default_generator()
test_fixed_base_step()

numdifftools.tests.test_numdifftools_docstrings module

numdifftools.tests.test_numdifftools_docstrings.load_tests(loader=None, tests=None, ignore=None)[source]
numdifftools.tests.test_numdifftools_docstrings.suite()[source]

Module contents