n3fit.tests package
Subpackages
Submodules
n3fit.tests.conftest module
n3fit.tests.test_backend module
This module tests the mathematical functions in the n3fit backend and ensures they do the same thing as their numpy counterparts
- n3fit.tests.test_backend.are_equal(result, reference, threshold=1e-06)[source]
checks the difference between array reference and tensor result is below threshold for all elements
- n3fit.tests.test_backend.numpy_check(backend_op, python_op, mode='same')[source]
Receives a backend operation (backend_op) and a python operation python_op and asserts that, applied to two random arrays, the result is the same. The option mode selects the two arrays to be tested and accepts the following options:
same (default): two arrays of the same dimensionality
diff: first array has one extra dimension that second array
single: only one array enters the operation
- (tensor, array): if passed a tuple (backend tensor, numpy array), uses these
values as tensor and array inputs for the operations
n3fit.tests.test_checks module
n3fit.tests.test_evolven3fit module
n3fit.tests.test_fit module
n3fit.tests.test_hyperopt module
n3fit.tests.test_layers module
Tests for the layers of n3fit This module checks that the layers do what they would do with numpy
- n3fit.tests.test_layers.generate_input_DIS(flavs=3, xsize=2, ndata=5, n_combinations=-1)[source]
Generates fake input (fktable and array of combinations) for the DIS convolution
- n3fit.tests.test_layers.generate_input_had(flavs=3, xsize=2, ndata=4, n_combinations=None)[source]
Generates fake input (fktable and array of combinations) for the hadronic convolution
n3fit.tests.test_losses module
Test the losses layers
n3fit.tests.test_modelgen module
Test for the model generation
These tests check that the generated NN are as expected It checks that both the number of layers and the shape of the weights of the layers are what is expected
n3fit.tests.test_msr module
n3fit.tests.test_multidense module
n3fit.tests.test_multireplica module
n3fit.tests.test_penalties module
Test the penalties for n3fit hyperopt
- n3fit.tests.test_penalties.test_integrability_numbers()[source]
Check that the integrability penalty runs and returns a float
n3fit.tests.test_preprocessing module
n3fit.tests.test_rotations module
n3fit.tests.test_stopwatch module
Tests the stopwatch does what is supposed to do
n3fit.tests.test_vpinterface module
n3fit.tests.test_xops module
Test the x operations
- n3fit.tests.test_xops.test_xdivide_default()[source]
Check that the default xDivide works as expected