Skip to content

Commit f595643

Browse files
mezzarobbatscrim
andcommitted
Minor changes suggested by Travis Scrimshaw
Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent 78dcd21 commit f595643

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sage/rings/polynomial/multi_polynomial_libsingular.pyx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,6 +2066,8 @@ cdef class MPolynomial_libsingular(MPolynomial):
20662066
sage: f(y).parent()
20672067
Multivariate Polynomial Ring in y over Finite Field in a of size 2^4
20682068
"""
2069+
cdef Element sage_res
2070+
20692071
if len(kwds) > 0:
20702072
f = self.subs(**kwds)
20712073
if len(x) > 0:
@@ -2093,7 +2095,7 @@ cdef class MPolynomial_libsingular(MPolynomial):
20932095
# give up, evaluate functional
20942096
sage_res = parent.base_ring().zero()
20952097
for (m,c) in self.dict().iteritems():
2096-
sage_res += c*mul([ x[i]**m[i] for i in m.nonzero_positions()])
2098+
sage_res += c * mul([x[i] ** m[i] for i in m.nonzero_positions()])
20972099
else:
20982100
singular_polynomial_call(&res, self._poly, _ring, coerced_x, MPolynomial_libsingular_get_element)
20992101

@@ -2105,7 +2107,7 @@ cdef class MPolynomial_libsingular(MPolynomial):
21052107
else:
21062108
sage_res = new_MP(parent, res) # pass on ownership of res to sage_res
21072109

2108-
if sage_res.parent() is not res_parent:
2110+
if sage_res._parent is not res_parent:
21092111
sage_res = res_parent(sage_res)
21102112
return sage_res
21112113

0 commit comments

Comments
 (0)