#NEWLINE# @ lower ( 'np.random.power' , types . Float ) #NEWLINE# def power_impl( context , builder , sig , args ) : #NEWLINE# #INDENT# def power_impl( a ) : #NEWLINE# #INDENT# if ( a <= 0.0 ) : #NEWLINE# #INDENT# raise ValueError ( 'power(): a <= 0' ) #NEWLINE# #UNINDENT# return math . pow ( ( 1 - math . exp ( ( - np . random . standard_exponential ( ) ) ) ) , ( 1.0 / a ) ) #NEWLINE# #UNINDENT# res = context . compile_internal ( builder , power_impl , sig , args ) #NEWLINE# return impl_ret_untracked ( context , builder , sig . return_type , res )