# HG changeset patch
# User Charles Bouillaguet <charles.bouillaguet@gmail.com>
# Date 1340060044 -7200
# Node ID 3157ed4db429d7bf7df77e66242a3a62b1de3487
# Parent c239be1054e01526a1b0b62da6691061b9dd5587
Trac #13133: workaround crach inside PolyBori (BooleanMonomial.index() on constants)
diff --git a/sage/rings/polynomial/pbori.pyx b/sage/rings/polynomial/pbori.pyx
a
|
b
|
|
2166 | 2166 | sage: m.index() |
2167 | 2167 | 0 |
2168 | 2168 | |
| 2169 | # Check that Ticket #13133 is resolved: |
| 2170 | sage: B(1).lm().index() |
| 2171 | Traceback (most recent call last): |
| 2172 | ... |
| 2173 | ValueError: no variables in constant monomial ; cannot take index() |
| 2174 | |
2169 | 2175 | .. note:: |
2170 | 2176 | |
2171 | 2177 | This function is part of the upstream PolyBoRi interface. |
2172 | 2178 | """ |
| 2179 | if self.is_one(): |
| 2180 | raise ValueError, "no variables in constant monomial ; cannot take index()" |
2173 | 2181 | return self._pbmonom.firstIndex() |
2174 | 2182 | |
2175 | 2183 | def deg(BooleanMonomial self): |