#NEWLINE# @ cache_readonly #NEWLINE# def cdf( self ) : #NEWLINE# #INDENT# '\n        Returns the cumulative distribution function evaluated at the support.\n\n        Notes\n        -----\n        Will not work if fit has not been called.\n        ' #NEWLINE# _checkisfit ( self ) #NEWLINE# density = self . density #NEWLINE# kern = self . kernel #NEWLINE# if ( kern . domain is None ) : #NEWLINE# #INDENT# ( a , b ) = ( ( - np . inf ) , np . inf ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( a , b ) = kern . domain #NEWLINE# #UNINDENT# func = ( lambda x , s : kern . density ( s , x ) ) #NEWLINE# support = self . support #NEWLINE# support = np . r_ [ ( a , support ) ] #NEWLINE# gridsize = len ( support ) #NEWLINE# endog = self . endog #NEWLINE# probs = [ integrate . quad ( func , support [ ( i - 1 ) ] , support [ i ] , args = endog ) [ 0 ] for i in range ( 1 , gridsize ) ] #NEWLINE# return np . cumsum ( probs )