Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #10519: fix sorting of variables (make it platform independent)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Feb 16, 2016
1 parent a30a18a commit f58efc9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,6 @@ def smooth_critical_ideal(self, alpha):
Univariate Polynomial Ring in a over Rational Field
"""
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.sets.set import Set

R = self.denominator_ring
Hred = prod([h for (h, e) in self.denominator_factored()])
Expand All @@ -2853,7 +2852,7 @@ def smooth_critical_ideal(self, alpha):
for a in alpha:
if a not in K and a in SR:
indets.append(a)
indets = sorted(Set(indets)) # Delete duplicates in indets.
indets = sorted(set(indets), key=str) # Delete duplicates in indets.
if indets:
L = PolynomialRing(K, indets).fraction_field()
S = R.change_ring(L)
Expand Down Expand Up @@ -4372,10 +4371,10 @@ def coerce_point(R, p):
sage: p = {SR(x): 1, SR(y): 7/8}
sage: p
{y: 7/8, x: 1}
sage: for k in sorted(p.keys()):
sage: for k in sorted(p.keys(), key=str):
....: print k, k.parent()
y Symbolic Ring
x Symbolic Ring
y Symbolic Ring
sage: q = coerce_point(R, p)
sage: q
{y: 7/8, x: 1}
Expand Down

0 comments on commit f58efc9

Please sign in to comment.