#NEWLINE# def test_quantile_multi( self ) : #NEWLINE# #INDENT# from numpy import percentile #NEWLINE# qs = [ 0.1 , 0.9 ] #NEWLINE# result = self . ts . quantile ( qs ) #NEWLINE# expected = pd . Series ( [ percentile ( self . ts . valid ( ) , 10 ) , percentile ( self . ts . valid ( ) , 90 ) ] , index = self , name = self . ts . name ) #NEWLINE# tm . assert_series_equal ( result , expected ) #NEWLINE# dts = self . ts . index . to_series ( ) #NEWLINE# dts . name = 'xxx' #NEWLINE# result = dts . quantile ( ( 0.2 , 0.2 ) ) #NEWLINE# expected = Series ( [ Timestamp ( '2000-01-10 19:12:00' ) , Timestamp ( '2000-01-10 19:12:00' ) ] , index = [ 0.2 , 0.2 ] , name = 'xxx' ) #NEWLINE# tm . assert_series_equal ( result , expected ) #NEWLINE# result = self . ts . quantile ( [ ] ) #NEWLINE# expected = pd . Series ( [ ] , name = self . ts . name , index = Index ( [ ] , dtype = float ) ) #NEWLINE# tm . assert_series_equal ( result , expected )