From 30f060417bc787ebe50c2a0dbd163b4e4a817ee5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 22 Nov 2024 15:56:43 -0500 Subject: [PATCH] mjo/cone/permutation_invariant.py: don't import from sage.all --- mjo/cone/permutation_invariant.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mjo/cone/permutation_invariant.py b/mjo/cone/permutation_invariant.py index 982dd29..ea89cba 100644 --- a/mjo/cone/permutation_invariant.py +++ b/mjo/cone/permutation_invariant.py @@ -1,5 +1,3 @@ -from sage.all import * - def random_permutation_invariant_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None, @@ -32,12 +30,14 @@ def random_permutation_invariant_cone(lattice=None, # them with permutation matrices. V = K.lattice().vector_space() - # The set of all permutatin matrices on ``V``. + # The set of all permutation matrices on ``V``. + from sage.groups.perm_gps.permgroup_named import SymmetricGroup Sn = ( p.matrix() for p in SymmetricGroup(V.dimension()) ) # Set of permuted generators pgens = ( permutation*V(g) for permutation in Sn for g in K ) + from sage.geometry.cone import Cone return Cone(pgens, K.lattice()) @@ -75,6 +75,7 @@ def is_permutation_invariant(K): V = K.lattice().vector_space() # The set of all permutation matrices on ``V``. + from sage.groups.perm_gps.permgroup_named import SymmetricGroup Sn = ( p.matrix() for p in SymmetricGroup(V.dimension()) ) return all(K.contains(permutation*V(g)) -- 2.49.0