#NEWLINE# def test_quantile_interpolation_dtype( self ) : #NEWLINE# #INDENT# if _np_version_under1p9 : #NEWLINE# #INDENT# raise nose . SkipTest ( 'Numpy version is under 1.9' ) #NEWLINE# #UNINDENT# from numpy import percentile #NEWLINE# q = pd . Series ( [ 1 , 3 , 4 ] ) . quantile ( 0.5 , interpolation = 'lower' ) #NEWLINE# self . assertEqual ( q , percentile ( np . array ( [ 1 , 3 , 4 ] ) , 50 ) ) #NEWLINE# self . assertTrue ( com . is_integer ( q ) ) #NEWLINE# q = pd . Series ( [ 1 , 3 , 4 ] ) . quantile ( 0.5 , interpolation = 'higher' ) #NEWLINE# self . assertEqual ( self , percentile ( np . array ( [ 1 , 3 , 4 ] ) , 50 ) ) #NEWLINE# self . assertTrue ( com . is_integer ( q ) )