Coverage for docs\source\examples\vectorization.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-23 21:21 -0400

1"Example Vectorize usage, from gpkit/tests/t_vars.py" 

2from gpkit import Variable, Vectorize, VectorVariable 

3 

4with Vectorize(3): 

5 with Vectorize(5): 

6 y = Variable("y") 

7 x = VectorVariable(2, "x") 

8 z = VectorVariable(7, "z") 

9 

10assert(y.shape == (5, 3)) 

11assert(x.shape == (2, 5, 3)) 

12assert(z.shape == (7, 3))