def test_simple_two_model_class_compose_1d():
 S1 = (Shift | Scale)
 assert issubclass(S1, Model)
 assert (S1.n_inputs == 1)
 assert (S1.n_outputs == 1)
 s1 = S1(2, 3)
 assert (s1(1) == 9.0)
 S2 = (Scale | Shift)
 assert issubclass(S2, Model)
 assert (S2.n_inputs == 1)
 assert (S2.n_outputs == 1)
 s2 = S2(2, 3)
 assert (s2(1) == 5.0)
 assert_array_equal(s2([1, 2, 3]), [5.0, 7.0, 9.0])

def test_simple_two_model_class_compose_1d ( ) : S1 = ( Shift | Scale ) assert issubclass ( S1 , Model ) assert ( S1 . n_inputs == 1 ) assert ( S1 . n_outputs == 1 ) s1 = S1 ( 2 , 3 ) assert ( s1 ( 1 ) == 9.0 ) S2 = ( Scale | Shift ) assert issubclass ( S2 , Model ) assert ( S2 . n_inputs == 1 ) assert ( S2 . n_outputs == 1 ) s2 = S2 ( 2 , 3 ) assert ( s2 ( 1 ) == 5.0 ) assert_array_equal ( s2 ( [ 1 , 2 , 3 ] ) , [ 5.0 , 7.0 , 9.0 ] )
shift and scale are two of the simplest models to test model composition with .