File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -555,12 +555,15 @@ def test_outputs_consistency(self):
555555
556556 def test_explicit_input_from_constant (self ):
557557 x = pt .dscalar ("x" )
558- y = constant (1.0 , name = "y" )
558+ y = constant (1.0 , dtype = x . type . dtype , name = "y" )
559559 test_ofg = OpFromGraph ([x , y ], [x + y ])
560560
561561 out = test_ofg (x , y )
562562 assert out .eval ({x : 5 }) == 6
563563
564+ out = test_ofg (x , x )
565+ assert out .eval ({x : 5 }) == 10
566+
564567 def test_explicit_input_from_shared (self ):
565568 x = pt .dscalar ("x" )
566569 y = shared (1.0 , name = "y" )
@@ -576,7 +579,10 @@ def test_explicit_input_from_shared(self):
576579 out = test_ofg (x , y )
577580 assert out .eval ({x : 5 }) == 6
578581 y .set_value (2.0 )
579- assert out .eval ({x : 6 })
582+ assert out .eval ({x : 6 }) == 8
583+
584+ out = test_ofg (y , y )
585+ assert out .eval () == 4
580586
581587
582588@config .change_flags (floatX = "float64" )
You can’t perform that action at this time.
0 commit comments