#NEWLINE# def test_all_distributions( ) : #NEWLINE# #INDENT# for dist in dists : #NEWLINE# #INDENT# distfunc = getattr ( stats , dist ) #NEWLINE# nargs = distfunc . numargs #NEWLINE# alpha = 0.01 #NEWLINE# if ( dist == 'fatiguelife' ) : #NEWLINE# #INDENT# alpha = 0.001 #NEWLINE# #UNINDENT# if ( dist == 'trapz' ) : #NEWLINE# #INDENT# args = tuple ( np . sort ( np . random . random ( nargs ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dist == 'triang' ) : #NEWLINE# #INDENT# args = tuple ( np . random . random ( nargs ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dist == 'reciprocal' ) : #NEWLINE# #INDENT# vals = np . random . random ( nargs ) #NEWLINE# vals [ 1 ] = ( dist [ 0 ] + 1.0 ) #NEWLINE# args = tuple ( vals ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( dist == 'vonmises' ) : #NEWLINE# #INDENT# ( yield ( check_distribution , dist , ( 10 , ) , alpha ) ) #NEWLINE# ( yield ( check_distribution , dist , ( 101 , ) , alpha ) ) #NEWLINE# args = tuple ( ( 1.0 + np . random . random ( nargs ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# args = tuple ( ( 1.0 + np . random . random ( nargs ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# ( yield ( check_distribution , dist , args , alpha ) )