def test_simple_two_model_class_compose_2d():
 R = (Rotation2D | Rotation2D)
 assert issubclass(R, Model)
 assert (R.n_inputs == 2)
 assert (R.n_outputs == 2)
 r1 = R(45, 45)
 assert_allclose(r1(0, 1), ((-1), 0), atol=1e-10)
 r2 = R(90, 90)
 assert_allclose(r2(0, 1), (0, (-1)), atol=1e-10)
 R2 = (R | R)
 r3 = R2(45, 45, 45, 45)
 assert_allclose(r3(0, 1), (0, (-1)), atol=1e-10)

def test_simple_two_model_class_compose_2d ( ) : R = ( Rotation2D | Rotation2D ) assert issubclass ( R , Model ) assert ( R . n_inputs == 2 ) assert ( R . n_outputs == 2 ) r1 = R ( 45 , 45 ) assert_allclose ( r1 ( 0 , 1 ) , ( ( - 1 ) , 0 ) , atol = 1e-10 ) r2 = R ( 90 , 90 ) assert_allclose ( r2 ( 0 , 1 ) , ( 0 , ( - 1 ) ) , atol = 1e-10 ) R2 = ( R | R ) r3 = R2 ( 45 , 45 , 45 , 45 ) assert_allclose ( r3 ( 0 , 1 ) , ( 0 , ( - 1 ) ) , atol = 1e-10 )
a simple example consisting of two rotations .