def times_time_shift_2(): # time_shift_cond assert(np.all(np.arange(5)-1==time_shift_cond(np.arange(5),1) )) # make_shift_matrix assert(np.all(make_shift_matrix(np.arange(5),np.arange(2))== np.array([0,1,2,3,4, -1,0,1,2,3]).reshape((2,-1)).T))
def times_time_shift_2(): # time_shift_cond assert (np.all(np.arange(5) - 1 == time_shift_cond(np.arange(5), 1))) # make_shift_matrix assert (np.all( make_shift_matrix(np.arange(5), np.arange(2)) == np.array( [0, 1, 2, 3, 4, -1, 0, 1, 2, 3]).reshape((2, -1)).T))
def test_time_shift_3(): happy=time_shift_cond(np.arange(100),5) assert(np.all(happy== -5+np.arange(100)))
def test_time_shift_3(): happy = time_shift_cond(np.arange(100), 5) assert (np.all(happy == -5 + np.arange(100)))