Skip to content

Commit 632a575

Browse files
committed
fix code that relied on const_pol(x=a,y=b) landing in the wrong parent
1 parent f595643 commit 632a575

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sage/modular/modform_hecketriangle/graded_ring_element.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,9 @@ def _q_expansion_cached(self, prec, fix_d, subs_d, d_num_prec, fix_prec = False)
15661566
Y = SC.f_i_ZZ().base_extend(formal_d.parent())
15671567

15681568
if (self.parent().is_modular()):
1569-
qexp = self._rat.subs(x=X, y=Y, d=formal_d)
1569+
# z does not appear in self._rat but we need to specialize it for
1570+
# the evaluation to land in the correct parent
1571+
qexp = self._rat.subs(x=X, y=Y, z=0, d=formal_d)
15701572
else:
15711573
Z = SC.E2_ZZ().base_extend(formal_d.parent())
15721574
qexp = self._rat.subs(x=X, y=Y, z=Z, d=formal_d)

0 commit comments

Comments
 (0)