@@ -296,6 +296,7 @@ from .closure cimport _pari_init_closure
296296# when no explicit precision is given and the inputs are exact.
297297cdef long prec = prec_bits_to_words(53 )
298298
299+
299300# ################################################################
300301# conversions between various real precision models
301302# ################################################################
@@ -632,10 +633,10 @@ cdef class Pari(Pari_auto):
632633 # chances that something goes wrong here (for example, if we
633634 # are out of memory).
634635 printf(" top = %p \n avma = %p \n bot = %p \n size = %lu \n " ,
635- < void * > pari_mainstack.top,
636- < void * > avma,
637- < void * > pari_mainstack.bot,
638- < unsigned long > pari_mainstack.rsize)
636+ < void * > pari_mainstack.top,
637+ < void * > avma,
638+ < void * > pari_mainstack.bot,
639+ < unsigned long > pari_mainstack.rsize)
639640 fflush(stdout)
640641
641642 def __repr__ (self ):
@@ -1025,7 +1026,7 @@ cdef class Pari(Pari_auto):
10251026 set_pari_stack_size(s, sizemax)
10261027 if not silent:
10271028 print (" PARI stack size set to {} bytes, maximum size set to {}" .
1028- format(self .stacksize(), self .stacksizemax()))
1029+ format(self .stacksize(), self .stacksizemax()))
10291030
10301031 @staticmethod
10311032 def pari_version ():
@@ -1182,7 +1183,7 @@ cdef class Pari(Pari_auto):
11821183 return new_gen(mpfact(n))
11831184
11841185 def polsubcyclo (self , long n , long d , v = None ):
1185- """
1186+ r """
11861187 polsubcyclo( n, d, v=x) : return the pari list of polynomial( s)
11871188 defining the sub-abelian extensions of degree `d` of the
11881189 cyclotomic field `\Q Q( \z eta_n) `, where `d`
@@ -1265,8 +1266,7 @@ cdef class Pari(Pari_auto):
12651266 v = self ._empty_vector(n)
12661267 if entries is not None :
12671268 if len (entries) != n:
1268- raise IndexError (" length of entries (=%s ) must equal n (=%s )" % \
1269- (len (entries), n))
1269+ raise IndexError (f" length of entries (={len(entries)}) must equal n (={n})" )
12701270 for i, x in enumerate (entries):
12711271 v[i] = x
12721272 return v
@@ -1293,22 +1293,22 @@ cdef class Pari(Pari_auto):
12931293 cdef Gen x
12941294
12951295 sig_on()
1296- A = new_gen(zeromatcopy(m,n))
1296+ A = new_gen(zeromatcopy(m, n))
12971297 if entries is not None :
12981298 if len (entries) != m * n:
1299- raise IndexError (" len of entries (=%s ) must be %s *%s =%s " % (len (entries),m,n, m* n))
1299+ raise IndexError (" len of entries (=%s ) must be %s *%s =%s " % (len (entries), m, n, m* n))
13001300 k = 0
13011301 for i in range (m):
13021302 for j in range (n):
13031303 sig_check()
13041304 x = objtogen(entries[k])
13051305 set_gcoeff(A.g, i+ 1 , j+ 1 , x.ref_target())
1306- A.cache((i,j), x)
1306+ A.cache((i, j), x)
13071307 k += 1
13081308 return A
13091309
13101310 def genus2red (self , P , p = None ):
1311- """
1311+ r """
13121312 Let `P` be a polynomial with integer coefficients.
13131313 Determines the reduction of the ( proper, smooth) genus 2
13141314 curve `C/\Q Q`, defined by the hyperelliptic equation `y^ 2 = P`.
0 commit comments