Coverage for docs/source/examples/sin_approx_example.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1"Can be found in gpkit/docs/source/examples/sin_approx_example.py" 

2import numpy as np 

3from gpkit import Variable, Model 

4 

5 

6x = Variable("x") 

7y = Variable("y") 

8 

9objective = y 

10 

11constraints = [y >= x, 

12 x <= np.pi/2, 

13 x >= np.pi/4, 

14 ] 

15 

16m = Model(objective, constraints) 

17print(m.solve(verbosity=0).summary())