mpi_array.globale_ufunc_test.GndarrayUfuncTest¶
-
class
mpi_array.globale_ufunc_test.
GndarrayUfuncTest
(methodName='runTest')[source]¶ Bases:
mpi_array.unittest.TestCase
unittest.TestCase
formpi_array.globale_ufunc
.Methods
__init__
([methodName])Create an instance of the class that will use the named test method when executed. addCleanup
(function, *args, **kwargs)Add a function, with arguments, to be called when the test is completed. addTypeEqualityFunc
(typeobj, function)Add a type specific assertEqual style function to compare a type. assertArraySplitEqual
(splt1, splt2)Compares list
ofnumpy.ndarray
results returned bynumpy.mpi_array()
andmpi_array.split.mpi_array()
functions.compare_results
(mpi_cln_npy_result_ary, ...)Asserts that all elements of the mpi_array.globale.gndarray
mpi_cln_npy_result_ary
equal all elements of thempi_array.globale.gndarray
mpi_result_ary
.convert_func_args_to_gndarrays
(converter, ...)type converter: ToGndarrayConverter
countTestCases
()debug
()Run the test without collecting errors in a TestResult defaultTestResult
()doCleanups
()Execute all cleanup functions. do_block_distribution_test
(...)Converts numpy.ndarray
elements offunc_args
tompi_array.globale.gndarray
instances distributed as thempi_array.comms.DT_BLOCK
distribution type.do_cloned_distribution_test
(...)Converts numpy.ndarray
elements offunc_args
tompi_array.globale.gndarray
instances distributed as thempi_array.comms.DT_CLONED
distribution type.do_convert_execute_and_compare
(...)Compares the result of func
called withself.convert_func_args_to_gndarrays(converter, func_args)
converted arguments with thempi_cln_npy_result_ary
array (which should have been produced by callingmpi_array.globale_creation.asarray(func(*func_args))
).do_multi_distribution_tests
(func, *func_args)Compares result of func
called withnumpy.ndarray
arguments and result offunc
called withmpi_array.globale.gndarray
arguments.do_single_locale_distribution_test
(...)Converts numpy.ndarray
elements offunc_args
tompi_array.globale.gndarray
instances distributed as thempi_array.comms.DT_SINGLE_LOCALE
distribution type.do_test_umath
([halo, gshape])Test binary op for a mpi_array.globale.gndarray
object and a scalar.do_test_umath_broadcast
([halo, dims])Test binary op for a mpi_array.globale.gndarray
objects and an array-like object which requires requiring broadcast to result shape.do_test_umath_broadcast_upsized_result
([...])Test binary op for two mpi_array.globale.gndarray
objects with the resultingmpi_array.globale.gndarray
object having different (larger) shape than that of both inputs.do_test_umath_distributed_broadcast
([...])Test binary op for two mpi_array.globale.gndarray
objects which requires remote fetch of data when broadcasting to result shape.id
()run
([result])setUp
()Initialise numpy.random.seed()
.setUpClass
()Hook method for setting up class fixture before running tests in the class. shortDescription
()Returns a one-line description of the test, or None if no description has been provided. skipTest
(reason)Skip this test. subTest
([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters. tearDown
()Hook method for deconstructing the test fixture after testing it. tearDownClass
()Hook method for deconstructing the class fixture after running all tests in the class. test_check_equivalent_inter_locale_comms
()test_not_implemented
()test_ufunc_casting_arg
()Test ufunc with casting argument. test_umath_broadcast_halo
()Test binary op for a mpi_array.globale.gndarray
objects and an array-like object which requires requiring broadcast to result shape.test_umath_broadcast_no_halo
()Test binary op for a mpi_array.globale.gndarray
objects and an array-like object which requires requiring broadcast to result shape.test_umath_broadcast_upsized_result
()Test binary op for two mpi_array.globale.gndarray
objects with the resultingmpi_array.globale.gndarray
object having different (larger) shape than that of both inputs.test_umath_distributed_broadcast_halo
()Test binary op for two mpi_array.globale.gndarray
objects which requires remote fetch of data when broadcasting to result shape.test_umath_distributed_broadcast_no_halo
()Test binary op for two mpi_array.globale.gndarray
objects which requires remote fetch of data when broadcasting to result shape.test_umath_halo
()Test binary op for a mpi_array.globale.gndarray
object and a scalar, test halo is preserved.test_umath_multiply
()Asserts that binary ufunc multiplication ( numpy.multiply
) computation formpi_array.globale.gndarray
arguments produces same results as fornumpy.ndarray
arguments.test_umath_no_halo
()Test binary op for a mpi_array.globale.gndarray
object and a scalar.Attributes
longMessage
maxDiff
rank_logger
A logging.Logger
object.