def test_identity_input():
 ident1 = Identity(1)
 shift = Shift(1)
 rotation = Rotation2D(angle=90)
 model = ((ident1 & shift) | rotation)
 assert_allclose(model(1, 2), [(-3.0), 1.0])
 TestModel = ((ident1 & Shift) | Rotation2D)
 model = TestModel(offset_1=1, angle_2=90)
 assert_allclose(model(1, 2), [(-3.0), 1.0])

def test_identity_input ( ) : ident1 = Identity ( 1 ) shift = Shift ( 1 ) rotation = Rotation2D ( angle = 90 ) model = ( ( ident1 & shift ) | rotation ) assert_allclose ( model ( 1 , 2 ) , [ ( - 3.0 ) , 1.0 ] ) TestModel = ( ( ident1 & Shift ) | Rotation2D ) model = TestModel ( offset_1 = 1 , angle_2 = 90 ) assert_allclose ( model ( 1 , 2 ) , [ ( - 3.0 ) , 1.0 ] )
test a case where an identity model is the first in a chain of composite models and thus is responsible for handling input broadcasting properly .