Skip to content

Commit b6aeb31

Browse files
committed
try to use more lazy rings
1 parent ff5f554 commit b6aeb31

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lmfdb/siegel_modular_forms/dimensions.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#
55
# Author: Nils Skoruppa <nils.skoruppa@gmail.com>
66

7-
from sage.all import (ZZ, QQ, FunctionField,
8-
PowerSeriesRing, LazyPowerSeriesRing)
7+
from sage.all import (ZZ, PolynomialRing, LazyPowerSeriesRing)
98

109
from lmfdb.utils import flash_error
1110
from lmfdb import db
@@ -228,15 +227,15 @@ def _dimension_Gamma_2(wt_range, j, group='Gamma(2)'):
228227
if not db_cusp:
229228
raise NotImplementedError(r'Dimensions of \(M_{k,j}\) for \(j=%d\) not implemented' % j)
230229

231-
P = PowerSeriesRing(ZZ, default_prec=wt_range[-1] + 1, names=('t'))
232-
Qt = FunctionField(QQ, names=('t'))
230+
P = LazyPowerSeriesRing(ZZ, 't')
231+
Qt = PolynomialRing(ZZ, 't').fraction_field()
233232
total = {}
234233
cusp = {}
235234
for p in partitions:
236235
f = Qt(str(db_total[p]))
237-
total[p] = P(f.numerator()) / P(f.denominator())
236+
total[p] = P(f)
238237
f = Qt(str(db_cusp[p]))
239-
cusp[p] = P(f.numerator()) / P(f.denominator())
238+
cusp[p] = P(f)
240239

241240
if 'Gamma(2)' == group:
242241
dct = {k: {p: [total[p][k], total[p][k] - cusp[p][k], cusp[p][k]]

0 commit comments

Comments
 (0)