#NEWLINE# def test_cummax( self ) : #NEWLINE# #INDENT# self . assert_numpy_array_equal ( self . ts . cummax ( ) , np . maximum . accumulate ( np . array ( self . ts ) ) ) #NEWLINE# ts = self . ts . copy ( ) #NEWLINE# ts [ : : 2 ] = np . NaN #NEWLINE# result = ts . cummax ( ) [ 1 : : 2 ] #NEWLINE# expected = np . maximum . accumulate ( ts . valid ( ) ) #NEWLINE# self . assert_numpy_array_equal ( result , expected )