#NEWLINE# def crit( self , prob , n ) : #NEWLINE# #INDENT# 'returns interpolated quantiles, similar to ppf or isf\n\n        use two sequential 1d interpolation, first by n then by prob\n\n        Parameters\n        ----------\n        prob : array_like\n            probabilities corresponding to the definition of table columns\n        n : int or float\n            sample size, second parameter of the table\n\n        Returns\n        -------\n        ppf : array_like\n            critical values with same shape as prob\n\n        ' #NEWLINE# prob = np . asarray ( prob ) #NEWLINE# alpha = self . alpha #NEWLINE# critv = self . _critvals ( n ) #NEWLINE# cond_ilow = ( prob > alpha [ 0 ] ) #NEWLINE# cond_ihigh = ( prob < alpha [ ( - 1 ) ] ) #NEWLINE# cond_interior = np . logical_or ( cond_ilow , cond_ihigh ) #NEWLINE# if ( prob . size == 1 ) : #NEWLINE# #INDENT# if cond_interior : #NEWLINE# #INDENT# return interp1d ( alpha , critv ) ( prob ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return np . nan #NEWLINE# #UNINDENT# #UNINDENT# quantile = ( np . nan * np . ones ( prob . shape ) ) #NEWLINE# quantile [ cond_interior ] = interp1d ( alpha , critv ) ( prob [ cond_interior ] ) #NEWLINE# return quantile