@@ -108,7 +108,7 @@ def __init__(self, conductor, gammaV, weight, eps, poles=[],
108
108
if args or kwds :
109
109
self .init_coeffs (* args , ** kwds )
110
110
111
- def init_coeffs (self , v , cutoff = None , w = 1 , * args , ** kwds ):
111
+ def init_coeffs (self , v , cutoff = None , w = 1 ):
112
112
"""
113
113
Set the coefficients `a_n` of the `L`-series.
114
114
@@ -126,7 +126,7 @@ def init_coeffs(self, v, cutoff=None, w=1, *args, **kwds):
126
126
EXAMPLES::
127
127
128
128
sage: from sage.lfunctions.pari import lfun_generic, LFunction
129
- sage: lf = lfun_generic(conductor=1, gammaV=[0,1], weight=12, eps=1)
129
+ sage: lf = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
130
130
sage: pari_coeffs = pari('k->vector(k,n,(5*sigma(n,3)+7*sigma(n,5))*n/12 - 35*sum(k=1,n-1,(6*k-4*(n-k))*sigma(k,3)*sigma(n-k,5)))')
131
131
sage: lf.init_coeffs(pari_coeffs)
132
132
@@ -144,7 +144,7 @@ def init_coeffs(self, v, cutoff=None, w=1, *args, **kwds):
144
144
Illustrate that one can give a list of complex numbers for v
145
145
(see :trac:`10937`)::
146
146
147
- sage: l2 = lfun_generic(conductor=1, gammaV=[0,1], weight=12, eps=1)
147
+ sage: l2 = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
148
148
sage: l2.init_coeffs(list(delta_qexp(1000))[1:])
149
149
sage: L2 = LFunction(l2)
150
150
sage: L2(14)
@@ -155,20 +155,9 @@ def init_coeffs(self, v, cutoff=None, w=1, *args, **kwds):
155
155
Verify that setting the `w` parameter does not raise an error
156
156
(see :trac:`10937`)::
157
157
158
- sage: L2 = lfun_generic(conductor=1, gammaV=[0,1], weight=12, eps=1)
158
+ sage: L2 = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
159
159
sage: L2.init_coeffs(list(delta_qexp(1000))[1:], w=[1..1000])
160
-
161
- Additional arguments are ignored for compatibility with the old
162
- Dokchitser script::
163
-
164
- sage: L2.init_coeffs(list(delta_qexp(1000))[1:], foo="bar")
165
- doctest:...: DeprecationWarning: additional arguments for initializing an lfun_generic are ignored
166
- See https://trac.sagemath.org/26098 for details.
167
160
"""
168
- if args or kwds :
169
- from sage .misc .superseded import deprecation
170
- deprecation (26098 , "additional arguments for initializing an lfun_generic are ignored" )
171
-
172
161
v = pari (v )
173
162
if v .type () not in ('t_CLOSURE' , 't_VEC' ):
174
163
raise TypeError ("v (coefficients) must be a list or a function" )
@@ -250,12 +239,12 @@ def lfun_character(chi):
250
239
251
240
Check the values::
252
241
253
- sage: chi = DirichletGroup(24)([1,-1,-1]); chi
242
+ sage: chi = DirichletGroup(24)([1, -1, -1]); chi
254
243
Dirichlet character modulo 24 of conductor 24
255
244
mapping 7 |--> 1, 13 |--> -1, 17 |--> -1
256
245
sage: Lchi = lfun_character(chi)
257
246
sage: v = [0] + Lchi.lfunan(30).sage()
258
- sage: all(v[i] == chi(i) for i in (7,13,17))
247
+ sage: all(v[i] == chi(i) for i in (7, 13, 17))
259
248
True
260
249
"""
261
250
if not chi .is_primitive ():
@@ -285,7 +274,7 @@ def lfun_elliptic_curve(E):
285
274
Over number fields::
286
275
287
276
sage: K.<a> = QuadraticField(2)
288
- sage: E = EllipticCurve([1,a])
277
+ sage: E = EllipticCurve([1, a])
289
278
sage: L = LFunction(lfun_elliptic_curve(E))
290
279
sage: L(3)
291
280
1.00412346717019
@@ -309,7 +298,7 @@ def lfun_number_field(K):
309
298
sage: L(3)
310
299
1.20205690315959
311
300
312
- sage: K = NumberField(x**2- 2, 'a')
301
+ sage: K = NumberField(x**2 - 2, 'a')
313
302
sage: L = LFunction(lfun_number_field(K))
314
303
sage: L(3)
315
304
1.15202784126080
@@ -338,10 +327,10 @@ def lfun_eta_quotient(scalings, exponents):
338
327
sage: L(1)
339
328
0.0374412812685155
340
329
341
- sage: lfun_eta_quotient([6],[4])
330
+ sage: lfun_eta_quotient([6], [4])
342
331
[[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4])]], 0, [0, 1], 2, 36, 1]
343
332
344
- sage: lfun_eta_quotient([2,1, 4], [5,-2,-2])
333
+ sage: lfun_eta_quotient([2, 1, 4], [5, -2, -2])
345
334
Traceback (most recent call last):
346
335
...
347
336
PariError: sorry, noncuspidal eta quotient is not yet implemented
@@ -377,7 +366,7 @@ def lfun_quadratic_form(qf):
377
366
EXAMPLES::
378
367
379
368
sage: from sage.lfunctions.pari import lfun_quadratic_form, LFunction
380
- sage: Q = QuadraticForm(ZZ,2, [2,3, 4])
369
+ sage: Q = QuadraticForm(ZZ, 2, [2, 3, 4])
381
370
sage: L = LFunction(lfun_quadratic_form(Q))
382
371
sage: L(3)
383
372
0.377597233183583
@@ -409,7 +398,7 @@ def lfun_genus2(C):
409
398
sage: L(3)
410
399
0.965946926261520
411
400
412
- sage: C = HyperellipticCurve(x^2+ x, x^3+ x^2+ 1)
401
+ sage: C = HyperellipticCurve(x^2 + x, x^3 + x^2 + 1)
413
402
sage: L = LFunction(lfun_genus2(C))
414
403
sage: L(2)
415
404
0.364286342944359
@@ -445,11 +434,11 @@ class LFunction(SageObject):
445
434
0.000000000000000
446
435
sage: L.derivative(1)
447
436
0.305999773834052
448
- sage: L.derivative(1,2)
437
+ sage: L.derivative(1, 2)
449
438
0.373095594536324
450
439
sage: L.num_coeffs()
451
440
50
452
- sage: L.taylor_series(1,4)
441
+ sage: L.taylor_series(1, 4)
453
442
0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
454
443
sage: L.check_functional_equation() # abs tol 4e-19
455
444
1.08420217248550e-19
@@ -463,9 +452,9 @@ class LFunction(SageObject):
463
452
sage: L = E.lseries().dokchitser(algorithm="pari")
464
453
sage: L.num_coeffs()
465
454
163
466
- sage: L.derivative(1,E.rank())
455
+ sage: L.derivative(1, E.rank())
467
456
1.51863300057685
468
- sage: L.taylor_series(1,4)
457
+ sage: L.taylor_series(1, 4)
469
458
...e-19 + (...e-19)*z + 0.759316500288427*z^2 - 0.430302337583362*z^3 + O(z^4)
470
459
471
460
.. RUBRIC:: Number field
@@ -481,15 +470,15 @@ class LFunction(SageObject):
481
470
348
482
471
sage: L(2)
483
472
1.10398438736918
484
- sage: L.taylor_series(2,3)
473
+ sage: L.taylor_series(2, 3)
485
474
1.10398438736918 - 0.215822638498759*z + 0.279836437522536*z^2 + O(z^3)
486
475
487
476
.. RUBRIC:: Ramanujan `\Delta` L-function
488
477
489
478
The coefficients are given by Ramanujan's tau function::
490
479
491
480
sage: from sage.lfunctions.pari import lfun_generic, LFunction
492
- sage: lf = lfun_generic(conductor=1, gammaV=[0,1], weight=12, eps=1)
481
+ sage: lf = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
493
482
sage: tau = pari('k->vector(k,n,(5*sigma(n,3)+7*sigma(n,5))*n/12 - 35*sum(k=1,n-1,(6*k-4*(n-k))*sigma(k,3)*sigma(n-k,5)))')
494
483
sage: lf.init_coeffs(tau)
495
484
sage: L = LFunction(lf)
@@ -498,7 +487,7 @@ class LFunction(SageObject):
498
487
499
488
sage: L(1)
500
489
0.0374412812685155
501
- sage: L.taylor_series(1,3)
490
+ sage: L.taylor_series(1, 3)
502
491
0.0374412812685155 + 0.0709221123619322*z + 0.0380744761270520*z^2 + O(z^3)
503
492
"""
504
493
def __init__ (self , lfun , prec = None ):
@@ -608,7 +597,7 @@ def Lambda(self, s):
608
597
sage: L = LFunction(lfun_number_field(QQ))
609
598
sage: L.Lambda(2)
610
599
0.523598775598299
611
- sage: L.Lambda(1- 2)
600
+ sage: L.Lambda(1 - 2)
612
601
0.523598775598299
613
602
"""
614
603
s = self ._CCin (s )
@@ -630,7 +619,7 @@ def hardy(self, t):
630
619
631
620
TESTS::
632
621
633
- sage: L.hardy(.4+ .3*I)
622
+ sage: L.hardy(.4 + .3*I)
634
623
Traceback (most recent call last):
635
624
...
636
625
PariError: incorrect type in lfunhardy (t_COMPLEX)
@@ -694,7 +683,7 @@ def taylor_series(self, s, k=6, var='z'):
694
683
695
684
sage: E = EllipticCurve('389a')
696
685
sage: L = E.lseries().dokchitser(200,algorithm="pari")
697
- sage: L.taylor_series(1,3)
686
+ sage: L.taylor_series(1, 3)
698
687
2...e-63 + (...e-63)*z + 0.75931650028842677023019260789472201907809751649492435158581*z^2 + O(z^3)
699
688
700
689
Check that :trac:`25402` is fixed::
@@ -757,7 +746,7 @@ def __call__(self, s):
757
746
sage: L = E.lseries().dokchitser(100, algorithm="pari")
758
747
sage: L(1)
759
748
0.00000000000000000000000000000
760
- sage: L(1+ I)
749
+ sage: L(1 + I)
761
750
-1.3085436607849493358323930438 + 0.81298000036784359634835412129*I
762
751
"""
763
752
s = self ._CC (s )
0 commit comments