#NEWLINE# def test_MOM( ) : #NEWLINE# #INDENT# values = np . array ( [ 90.0 , 88.0 , 89.0 ] ) #NEWLINE# result = func . MOM ( values , timeperiod = 1 ) #NEWLINE# assert_np_arrays_equal ( result , [ np . nan , ( - 2 ) , 1 ] ) #NEWLINE# result = func . MOM ( result , timeperiod = 2 ) #NEWLINE# assert_np_arrays_equal ( result , [ np . nan , np . nan , ( - 1 ) ] ) #NEWLINE# result = func . MOM ( values , timeperiod = 3 ) #NEWLINE# assert_np_arrays_equal ( result , [ np . nan , np . nan , np . nan ] ) #NEWLINE# result = func . MOM ( values , timeperiod = 4 ) #NEWLINE# assert_np_arrays_equal ( result , [ np . nan , np . nan , np . nan ] )