#NEWLINE# def test_mapCtoD_2( self ) : #NEWLINE# #INDENT# 'Test function for mapCtoD() 2/6' #NEWLINE# ABCDc = np . array ( [ [ 0.0 , 0.0 , 0.0 , 0.04440879 , ( - 0.04440879 ) ] , [ 1.0 , 0.0 , ( - 0.00578297 ) , 0.0 , ( - 0.23997611 ) ] , [ 0.0 , 1.0 , 0.0 , 0.0 , ( - 0.67004646 ) ] , [ 0.0 , 0.0 , 1.0 , 0.0 , 0.0 ] ] ) #NEWLINE# tdac = np . array ( [ [ ( - 1.0 ) , ( - 1 ) ] , [ 0.0 , 1.0 ] ] ) #NEWLINE# ( sys_d , Gp ) = ds . mapCtoD ( ABCDc , tdac ) #NEWLINE# ABCD = np . vstack ( ( np . hstack ( ( sys_d [ 0 ] , sys_d [ 1 ] ) ) , np . hstack ( ( sys_d [ 2 ] , sys_d [ 3 ] ) ) ) ) #NEWLINE# ABCDref = np . array ( [ [ 1.0 , 0.0 , 0.0 , 0.04440879 , ( - 0.04440879 ) ] , [ 0.99903645 , 0.99710991 , ( - 0.0057774 ) , 0.0221937 , ( - 0.26000208 ) ] , [ 0.49975909 , 0.99903645 , 0.99710991 , 0.00739932 , ( - 0.79673041 ) ] , [ 0.0 , 0.0 , 1.0 , 0.0 , 0.0 ] ] ) #NEWLINE# self . assertTrue ( np . allclose ( sys_d , ABCDref , atol = 1e-08 , rtol = 1e-05 ) )