@@ -73,9 +73,9 @@ def test_example_div(self):
7373 We consider the following expression:
7474 \f rac{x + 2*y + z}{x + y}
7575 """
76- x = cp .Variable (name = 'x' )
77- y = cp .Variable (name = 'y' )
78- z = cp .Variable (name = 'z' )
76+ x = cp .Variable (( 1 ,), name = 'x' )
77+ y = cp .Variable (( 1 ,), name = 'y' )
78+ z = cp .Variable (( 1 ,), name = 'z' )
7979
8080 obj = (x + 2 * y + z ) / (x + y )
8181 problem = cp .Problem (cp .Minimize (obj ), [])
@@ -88,11 +88,10 @@ def test_example_div(self):
8888 w2 = x + y
8989 w3 = w1/w2
9090 """
91- assert str (new_prob .objective ) == "minimize var3"
92- assert len (new_prob .constraints ) == 3
93- assert str (new_prob .constraints [0 ]) == "var1 == x + 2.0 @ y + z"
94- assert str (new_prob .constraints [1 ]) == "var2 == x + y"
95- assert str (new_prob .constraints [2 ]) == "var3 == var1 / var2"
91+ assert str (new_prob .objective ) == "minimize var11"
92+ assert len (new_prob .constraints ) == 2
93+ assert str (new_prob .constraints [0 ]) == "var11 @ var12 == x + 2.0 @ y + z"
94+ assert str (new_prob .constraints [1 ]) == "var12 == x + y"
9695
9796 def test_example_mul (self ):
9897 """
0 commit comments