From 9e9087aaf158fc9776de030539832d4a3ffe2b8a Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Nov 2018 01:16:27 -0500 Subject: [PATCH] cone/cone.py: use generator expressions instead of lists. --- mjo/cone/cone.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index e507526..b7456e2 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -3,21 +3,21 @@ from sage.all import * def LL_cone(K): gens = K.lyapunov_like_basis() L = ToricLattice(K.lattice_dim()**2) - return Cone([ g.list() for g in gens ], lattice=L, check=False) + return Cone(( g.list() for g in gens ), lattice=L, check=False) def Sigma_cone(K): gens = K.cross_positive_operators_gens() L = ToricLattice(K.lattice_dim()**2) - return Cone([ g.list() for g in gens ], lattice=L, check=False) + return Cone(( g.list() for g in gens ), lattice=L, check=False) def Z_cone(K): gens = K.Z_operators_gens() L = ToricLattice(K.lattice_dim()**2) - return Cone([ g.list() for g in gens ], lattice=L, check=False) + return Cone(( g.list() for g in gens ), lattice=L, check=False) def pi_cone(K1, K2=None): if K2 is None: K2 = K1 gens = K1.positive_operators_gens(K2) L = ToricLattice(K1.lattice_dim()*K2.lattice_dim()) - return Cone([ g.list() for g in gens ], lattice=L, check=False) + return Cone(( g.list() for g in gens ), lattice=L, check=False) -- 2.44.2