Skip to content

Commit

Permalink
avoid failing code path by passing tuple to GF constructor
Browse files Browse the repository at this point in the history
This seems to fix the crashes (see #34281). It's obviously an ugly
hack to get things to work properly. At some point, someone should
really find the root cause of the issue and resolve it properly.
  • Loading branch information
yyyyx4 committed Aug 9, 2022
1 parent c6772dd commit 0b9db49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/rings/polynomial/pbori/pbori.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ cdef class BooleanPolynomialRing(MPolynomialRing_base):
pbnames = tuple(names)
names = [name.replace('(', '').replace(')', '') for name in pbnames]

MPolynomialRing_base.__init__(self, GF(2), n, names, order)
MPolynomialRing_base.__init__(self, GF((2,1)), n, names, order)

counter = 0
for i in range(len(order.blocks()) - 1):
Expand Down Expand Up @@ -1928,7 +1928,7 @@ class BooleanMonomialMonoid(UniqueRepresentation, Monoid_class):
cdef BooleanMonomial m
self._ring = polring
from sage.categories.monoids import Monoids
Parent.__init__(self, GF(2), names=polring._names, category=Monoids().Commutative())
Parent.__init__(self, GF((2,1)), names=polring._names, category=Monoids().Commutative())

m = new_BM(self, polring)
m._pbmonom = PBMonom(polring._pbring)
Expand Down

0 comments on commit 0b9db49

Please sign in to comment.