#NEWLINE# def test_quantile_interpolation_np_lt_1p9( self ) : #NEWLINE# #INDENT# if ( not _np_version_under1p9 ) : #NEWLINE# #INDENT# raise nose . SkipTest ( 'Numpy version is greater than 1.9' ) #NEWLINE# #UNINDENT# from numpy import percentile #NEWLINE# q = self . ts . quantile ( 0.1 , interpolation = 'linear' ) #NEWLINE# self . assertEqual ( q , percentile ( self . ts . valid ( ) , 10 ) ) #NEWLINE# q1 = self . ts . quantile ( 0.1 ) #NEWLINE# self . assertEqual ( expErrMsg , percentile ( self . ts . valid ( ) , 10 ) ) #NEWLINE# expErrMsg = 'Interpolation methods other than ' #NEWLINE# with tm . assertRaisesRegexp ( ValueError , expErrMsg ) : #NEWLINE# #INDENT# self . ts . quantile ( 0.9 , interpolation = 'nearest' ) #NEWLINE# #UNINDENT# with tm . assertRaisesRegexp ( ValueError , expErrMsg ) : #NEWLINE# #INDENT# q = Series ( self . ts , dtype = object ) . quantile ( 0.7 , interpolation = 'higher' )