File tree Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -1201,21 +1201,21 @@ cdef class gr_nf_ctx(gr_scalar_ctx):
12011201 def new (poly ) -> gr_nf_ctx:
12021202 """Create a new context for number fields.
12031203
1204- # >>> from flint.types._gr import gr_nf_ctx
1205- # >>> Qa = gr_nf_ctx.new([- 2 , 0 , 1 ])
1206- # >>> Qa
1207- # gr_nf_ctx(x^2 + (-2))
1208- # >>> Qa.modulus()
1209- # x^2 + (-2)
1210- # >>> a = Qa.gen()
1211- # >>> a
1212- # a
1213- # >>> a**2
1214- # 2
1215- # >>> (1 + a ) ** 2
1216- # 2*a+3
1217- # >>> (1 + a ) / 2
1218- # 1/2*a+1/2
1204+ >>> from flint.types._gr import gr_nf_ctx
1205+ >>> Qa = gr_nf_ctx.new([- 2 , 0 , 1 ])
1206+ >>> Qa
1207+ gr_nf_ctx(x^2 + (-2))
1208+ >>> Qa.modulus()
1209+ x^2 + (-2)
1210+ >>> a = Qa.gen()
1211+ >>> a
1212+ a
1213+ >>> a**2
1214+ 2
1215+ >>> (1 + a ) ** 2
1216+ 2*a+3
1217+ >>> (1 + a ) / 2
1218+ 1/2*a+1/2
12191219 """
12201220 poly = fmpq_poly(poly)
12211221 return gr_nf_ctx._new(poly )
@@ -1244,19 +1244,19 @@ cdef class gr_nf_fmpz_poly_ctx(gr_scalar_ctx):
12441244 def new (poly ) -> gr_nf_fmpz_poly_ctx:
12451245 """Create a new context for number fields.
12461246
1247- # >>> from flint.types._gr import gr_nf_fmpz_poly_ctx
1248- # >>> Qa = gr_nf_fmpz_poly_ctx.new([- 2 , 0 , 1 ])
1249- # >>> Qa
1250- # gr_nf_fmpz_poly_ctx(x^2 + (-2))
1251- # >>> Qa.modulus()
1252- # x^2 + (-2)
1253- # >>> a = Qa.gen()
1254- # >>> a
1255- # a
1256- # >>> a**2
1257- # 2
1258- # >>> (1 + a ) ** 2
1259- # 2*a+3
1247+ >>> from flint.types._gr import gr_nf_fmpz_poly_ctx
1248+ >>> Qa = gr_nf_fmpz_poly_ctx.new([- 2 , 0 , 1 ])
1249+ >>> Qa
1250+ gr_nf_fmpz_poly_ctx(x^2 + (-2))
1251+ >>> Qa.modulus()
1252+ x^2 + (-2)
1253+ >>> a = Qa.gen()
1254+ >>> a
1255+ a
1256+ >>> a**2
1257+ 2
1258+ >>> (1 + a ) ** 2
1259+ 2*a+3
12601260 """
12611261 poly = fmpz_poly(poly)
12621262 return gr_nf_fmpz_poly_ctx._new(poly )
You can’t perform that action at this time.
0 commit comments