|
24 | 24 | from sage.modules.free_module_element import is_FreeModuleElement
|
25 | 25 | from sage.matrix.constructor import matrix
|
26 | 26 | from sage.modules.free_module_element import vector
|
| 27 | +from sage.rings.all import Integer |
27 | 28 |
|
28 | 29 | from sage.misc.cachefunc import cached_method
|
29 | 30 |
|
@@ -2153,7 +2154,7 @@ def q_basis(self, m=None, min_exp=0, order_1=ZZ(0)):
|
2153 | 2154 |
|
2154 | 2155 | column_len = len(q_basis)
|
2155 | 2156 | if (m >= column_len + min_exp):
|
2156 |
| - raise ValueError("Index out of range: m={} >= {}=dimension + min_exp".format(m, size + min_exp)) |
| 2157 | + raise ValueError("Index out of range: m={} >= {}=dimension + min_exp".format(m, column_len + min_exp)) |
2157 | 2158 |
|
2158 | 2159 | return q_basis[m - min_exp]
|
2159 | 2160 | else:
|
@@ -2268,9 +2269,8 @@ def rationalize_series(self, laurent_series, coeff_bound = 1e-10, denom_factor =
|
2268 | 2269 | True
|
2269 | 2270 | """
|
2270 | 2271 |
|
2271 |
| - from sage.rings.all import FractionField, PolynomialRing, PowerSeriesRing, prime_range |
| 2272 | + from sage.rings.all import prime_range |
2272 | 2273 | from sage.misc.all import prod
|
2273 |
| - from sage.functions.other import factorial |
2274 | 2274 | from warnings import warn
|
2275 | 2275 |
|
2276 | 2276 | denom_factor = ZZ(denom_factor)
|
@@ -2336,7 +2336,7 @@ def denominator_estimate(m):
|
2336 | 2336 | return ZZ(1/dvalue)**m
|
2337 | 2337 |
|
2338 | 2338 | hecke_n = self.hecke_n()
|
2339 |
| - bad_factors = [fac for fac in factorial(m).factor() if (fac[0] % hecke_n) not in [1, hecke_n-1] and fac[0] > 2] |
| 2339 | + bad_factors = [fac for fac in Integer(m).factorial().factor() if (fac[0] % hecke_n) not in [1, hecke_n-1] and fac[0] > 2] |
2340 | 2340 | bad_factorial = prod([fac[0]**fac[1] for fac in bad_factors])
|
2341 | 2341 |
|
2342 | 2342 | return ZZ(2**(6*m) * hecke_n**(2*m) * prod([ p**m for p in prime_range(m+1) if hecke_n % p == 0 and p > 2 ]) * bad_factorial)**(cor_exp + 1)
|
|
0 commit comments