#NEWLINE# def __init__( self , cum , name = 'Edgeworth expanded normal' , **kwds ) : #NEWLINE# #INDENT# if ( len ( cum ) < 2 ) : #NEWLINE# #INDENT# raise ValueError ( 'At least two cumulants are needed.' ) #NEWLINE# #UNINDENT# ( self . _coef , self . _mu , self . _sigma ) = self . _compute_coefs_pdf ( cum ) #NEWLINE# self . _herm_pdf = HermiteE ( self . _coef ) #NEWLINE# if ( self . _coef . size > 2 ) : #NEWLINE# #INDENT# self . _herm_cdf = HermiteE ( ( - self . _coef [ 1 : ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _herm_cdf = ( lambda x : 0.0 ) #NEWLINE# #UNINDENT# r = np . real_if_close ( self . _herm_pdf . roots ( ) ) #NEWLINE# r = ( ( r - self . _mu ) / self . _sigma ) #NEWLINE# if r [ ( ( np . imag ( r ) == 0 ) & ( np . abs ( r ) < 4 ) ) ] . any ( ) : #NEWLINE# #INDENT# mesg = ( 'PDF has zeros at %s ' % r ) #NEWLINE# warnings . warn ( mesg , UserWarning ) #NEWLINE# #UNINDENT# kwds . update ( { #NEWLINE# #INDENT# 'name' : mesg , #NEWLINE# 'momtype' : 0 , #NEWLINE# #UNINDENT# } ) #NEWLINE# super ( ExpandedNormal , self ) . __init__ ( ** kwds )