From: Michael Orlitzky Date: Sun, 1 Feb 2026 18:10:19 +0000 (-0500) Subject: mjo/cone/decomposition.py: fix the vertices in irreducible_factors() X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c7533f22bd759fd07f6af842b9e2bcf665f7d6dd;p=sage.d.git mjo/cone/decomposition.py: fix the vertices in irreducible_factors() This bug is fixed in the upstream SageMath branch (with additional tests), but let's fix it here too until it hits "develop". --- diff --git a/mjo/cone/decomposition.py b/mjo/cone/decomposition.py index 8520d11..c28cf78 100644 --- a/mjo/cone/decomposition.py +++ b/mjo/cone/decomposition.py @@ -199,9 +199,9 @@ def irreducible_factors(K): # Make a graph with ray -> ray edges where the coefficients in the # W-representation nonzero. Beware: while they ultimately represent # rays of K, the W-coordinates have been renumbered by pivots(). - vertices = list(range(W.dimension())) + vertices = list(range(K.nrays())) edges = [ (i,pivots[j]) - for i in range(K.nrays()) + for i in vertices for j in W.coordinate_vector(K.ray(i)).nonzero_positions() if pivots[j] != i ] from sage.graphs.graph import Graph