#NEWLINE# def check_meth_dtype( distfn , arg , meths ) : #NEWLINE# #INDENT# q0 = [ 0.25 , 0.5 , 0.75 ] #NEWLINE# x0 = distfn . ppf ( q0 , * arg ) #NEWLINE# x_cast = [ x0 . astype ( meths ) for tp in ( np . int_ , np . float16 , np . float32 , np . float64 ) ] #NEWLINE# for x in x_cast : #NEWLINE# #INDENT# distfn . _argcheck ( * arg ) #NEWLINE# x = x [ ( ( distfn . a < x ) & ( x < distfn . b ) ) ] #NEWLINE# for meth in meths : #NEWLINE# #INDENT# val = meth ( x , * arg ) #NEWLINE# npt . assert_ ( ( val . dtype == np . float_ ) )