def gumbel(loc=0.0, scale=1.0, size=None, dtype=float):
 rs = uniform(size=size, dtype=dtype)
 return cupy.ElementwiseKernel('T x, T loc, T scale', 'T y', 'y = loc - log(-log(1 - x)) * scale', 'gumbel_kernel')(rs, loc, scale, rs)
 return rs

def gumbel ( loc = 0.0 , scale = 1.0 , size = None , dtype = float ) : rs = uniform ( size = size , dtype = dtype ) return cupy . ElementwiseKernel ( 'T x, T loc, T scale' , 'T y' , 'y = loc - log(-log(1 - x)) * scale' , 'gumbel_kernel' ) ( rs , loc , scale , rs ) return rs
returns an array of samples drawn from a gumbel distribution .