#NEWLINE# def run_unary( self , pyfunc , x_types , x_values , flags = no_pyobj_flags , func_extra_types = None , func_extra_args = None , ignore_sign_on_zero = False , abs_tol = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Runs tests for a unary function operating in the numerical real space.\n\n        Parameters\n        ----------\n        pyfunc : a python function definition holding that calls the numpy\n                 functions to be tested.\n        x_types: the types of the values being tested, see numba.types\n        x_values: the numerical values of the values to be tested\n        flags: flags to pass to the CompilationCache::ccache::compile function\n        func_extra_types: the types of additional arguments to the numpy\n                          function\n        func_extra_args:  additional arguments to the numpy function\n        ignore_sign_on_zero: boolean as to whether to allow zero values\n        with incorrect signs to be considered equal\n        prec: the required precision match, see assertPreciseEqual\n\n        Notes:\n        ------\n        x_types and x_values must have the same length\n\n        ' #NEWLINE# for ( tx , vx ) in zip ( x_types , x_values ) : #NEWLINE# #INDENT# if ( func_extra_args is None ) : #NEWLINE# #INDENT# func_extra_types = func_extra_args = [ ( ) ] #NEWLINE# #UNINDENT# for ( xtypes , xargs ) in zip ( func_extra_types , func_extra_args ) : #NEWLINE# #INDENT# cr = self . ccache . compile ( pyfunc , ( ( tx , ) + prec ) , flags = flags ) #NEWLINE# cfunc = cr . entry_point #NEWLINE# got = cfunc ( vx , * xargs ) #NEWLINE# expected = pyfunc ( vx , * xargs ) #NEWLINE# try : #NEWLINE# #INDENT# scalty = tx . dtype #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# scalty = tx #NEWLINE# #UNINDENT# prec = ( 'single' if ( scalty in ( types . float32 , types . complex64 ) ) else 'double' ) #NEWLINE# msg = ( 'for input %r with prec %r' % ( vx , prec ) ) #NEWLINE# self . assertPreciseEqual ( got , expected , prec = prec , msg = msg , ignore_sign_on_zero = ignore_sign_on_zero , abs_tol = abs_tol , ** kwargs )