From c41a2b88c599484041267165cf7f83fc880e4105 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Nov 2018 00:36:07 -0400 Subject: [PATCH] cone/schur.py: use generator expressions where applicable. --- mjo/cone/schur.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mjo/cone/schur.py b/mjo/cone/schur.py index 3903b2b..d1bad98 100644 --- a/mjo/cone/schur.py +++ b/mjo/cone/schur.py @@ -40,9 +40,9 @@ def schur_cone(n): sage: P = schur_cone(5) sage: Q = nonnegative_orthant(5) - sage: G = [ g.change_ring(QQbar).normalized() for g in P ] - sage: H = [ h.change_ring(QQbar).normalized() for h in Q ] - sage: actual = max([arccos(u.inner_product(v)) for u in G for v in H]) + sage: G = ( g.change_ring(QQbar).normalized() for g in P ) + sage: H = ( h.change_ring(QQbar).normalized() for h in Q ) + sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H) sage: expected = 3*pi/4 sage: abs(actual - expected).n() < 1e-12 True -- 2.44.2