#NEWLINE# @ lower ( 'np.random.rayleigh' ) #NEWLINE# @ lower ( 'np.random.rayleigh' , types . Float ) #NEWLINE# def rayleigh_impl( context , builder , sig , args ) : #NEWLINE# #INDENT# _random = np . random . random #NEWLINE# def rayleigh_impl( mode ) : #NEWLINE# #INDENT# if ( mode <= 0.0 ) : #NEWLINE# #INDENT# raise ValueError ( 'rayleigh(): mode <= 0' ) #NEWLINE# #UNINDENT# return ( mode * math . sqrt ( ( ( - 2.0 ) * math . log ( ( 1.0 - _random ( ) ) ) ) ) ) #NEWLINE# #UNINDENT# ( sig , args ) = _fill_defaults ( context , builder , sig , args , ( 1.0 , ) ) #NEWLINE# res = context . compile_internal ( sig , rayleigh_impl , sig , args ) #NEWLINE# return impl_ret_untracked ( context , builder , sig . return_type , res )