def _get_cached_pdf( self ):
     if len( self.pdf_values ) == 0:
         cdf_line = MFnLineArray( xdata = self.x_values, ydata = self.cdf_values )
         pdf = []
         for x in self.x_values:
             pdf.append( cdf_line.get_diff( x ) )
         return MFnLineArray( xdata = self.x_values, ydata = pdf )
     else:
         return MFnLineArray( xdata = self.x_values, ydata = self.pdf_values )
Esempio n. 2
0
 def _get_cached_pdf( self ):
     if len( self.pdf_values ) == 0:
         cdf_line = MFnLineArray( xdata = self.x_values, ydata = self.cdf_values )
         pdf = []
         for x in self.x_values:
             pdf.append( cdf_line.get_diff( x ) )
         return MFnLineArray( xdata = self.x_values, ydata = pdf )
     else:
         return MFnLineArray( xdata = self.x_values, ydata = self.pdf_values )