mpi_array.globale_ufunc_test.GndarrayUfuncTest¶
-
class
mpi_array.globale_ufunc_test.GndarrayUfuncTest(methodName='runTest')[source]¶ Bases:
mpi_array.unittest.TestCaseunittest.TestCaseformpi_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 listofnumpy.ndarrayresults 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.gndarraympi_cln_npy_result_aryequal all elements of thempi_array.globale.gndarraympi_result_ary.convert_func_args_to_gndarrays(converter, ...)type converter: ToGndarrayConvertercountTestCases()debug()Run the test without collecting errors in a TestResult defaultTestResult()doCleanups()Execute all cleanup functions. do_block_distribution_test(...)Converts numpy.ndarrayelements offunc_argstompi_array.globale.gndarrayinstances distributed as thempi_array.comms.DT_BLOCKdistribution type.do_cloned_distribution_test(...)Converts numpy.ndarrayelements offunc_argstompi_array.globale.gndarrayinstances distributed as thempi_array.comms.DT_CLONEDdistribution type.do_convert_execute_and_compare(...)Compares the result of funccalled withself.convert_func_args_to_gndarrays(converter, func_args)converted arguments with thempi_cln_npy_result_aryarray (which should have been produced by callingmpi_array.globale_creation.asarray(func(*func_args))).do_multi_distribution_tests(func, *func_args)Compares result of funccalled withnumpy.ndarrayarguments and result offunccalled withmpi_array.globale.gndarrayarguments.do_single_locale_distribution_test(...)Converts numpy.ndarrayelements offunc_argstompi_array.globale.gndarrayinstances distributed as thempi_array.comms.DT_SINGLE_LOCALEdistribution type.do_test_umath([halo, gshape])Test binary op for a mpi_array.globale.gndarrayobject and a scalar.do_test_umath_broadcast([halo, dims])Test binary op for a mpi_array.globale.gndarrayobjects 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.gndarrayobjects with the resultingmpi_array.globale.gndarrayobject having different (larger) shape than that of both inputs.do_test_umath_distributed_broadcast([...])Test binary op for two mpi_array.globale.gndarrayobjects 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_umath_broadcast_halo()Test binary op for a mpi_array.globale.gndarrayobjects 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.gndarrayobjects 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.gndarrayobjects with the resultingmpi_array.globale.gndarrayobject having different (larger) shape than that of both inputs.test_umath_distributed_broadcast_halo()Test binary op for two mpi_array.globale.gndarrayobjects 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.gndarrayobjects which requires remote fetch of data when broadcasting to result shape.test_umath_halo()Test binary op for a mpi_array.globale.gndarrayobject and a scalar, test halo is preserved.test_umath_multiply()Asserts that binary ufunc multiplication ( numpy.multiply) computation formpi_array.globale.gndarrayarguments produces same results as fornumpy.ndarrayarguments.test_umath_no_halo()Test binary op for a mpi_array.globale.gndarrayobject and a scalar.Attributes
longMessagemaxDiffrank_loggerA logging.Loggerobject.