Skip to content

Commit 2df0d10

Browse files
committed
remove multiple call of Vmatrix and Vmodule
1 parent fe1791f commit 2df0d10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sage/geometry/lattice_polytope.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5198,13 +5198,15 @@ def _palp_canonical_order(V, PM_max, permutations):
51985198
p_c = S_v((1 + i, 1 + k), check=False) * p_c
51995199
# Create array of possible NFs.
52005200
permutations = [p_c * l[1] for l in permutations.values()]
5201-
Vs = [(V.column_matrix().with_permuted_columns(sig).hermite_form(), sig)
5201+
Vmatrix = V.column_matrix()
5202+
Vs = [(Vmatrix.with_permuted_columns(sig).hermite_form(), sig)
52025203
for sig in permutations]
52035204
Vmin = min(Vs, key=lambda x:x[0])
5204-
vertices = [V.module()(_) for _ in Vmin[0].columns()]
5205+
Vmodule = V.module()
5206+
vertices = [Vmodule(_) for _ in Vmin[0].columns()]
52055207
for v in vertices:
52065208
v.set_immutable()
5207-
return (PointCollection(vertices, V.module()), Vmin[1])
5209+
return (PointCollection(vertices, Vmodule), Vmin[1])
52085210

52095211

52105212
def _palp_convert_permutation(permutation):

0 commit comments

Comments
 (0)