#NEWLINE# def check_cdf_ppf( distfn , arg , supp , msg ) : #NEWLINE# #INDENT# npt . assert_array_equal ( distfn . ppf ( distfn . cdf ( supp , * arg ) , * arg ) , supp , ( msg + '-roundtrip' ) ) #NEWLINE# npt . assert_array_equal ( distfn . ppf ( ( distfn . cdf ( supp , * arg ) - 1e-08 ) , * arg ) , supp , ( msg + '-roundtrip' ) ) #NEWLINE# supp1 = supp [ ( supp < distfn . b ) ] #NEWLINE# npt . assert_array_equal ( distfn . ppf ( ( distfn . cdf ( supp1 , * arg ) + 1e-08 ) , * arg ) , ( supp1 + distfn . inc ) , ( msg + 'ppf-cdf-next' ) )