Skip to content

Commit 7220cc5

Browse files
committed
Use to_bytes() in set_real_precision_bits()
1 parent 64f10ce commit 7220cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cypari2/pari_instance.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ cdef class Pari(Pari_auto):
645645
1.20000000000000000000000000000000000000000000000000000000000
646646
>>> pari.set_real_precision_bits(53)
647647
"""
648-
cdef bytes strn = str(n).encode("ascii")
648+
cdef bytes strn = to_bytes(n)
649649
sig_on()
650650
sd_realbitprecision(strn, d_SILENT)
651651
sig_off()

0 commit comments

Comments
 (0)