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):
1201
1201
def new (poly ) -> gr_nf_ctx:
1202
1202
"""Create a new context for number fields.
1203
1203
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
1219
1219
"""
1220
1220
poly = fmpq_poly(poly)
1221
1221
return gr_nf_ctx._new(poly )
@@ -1244,19 +1244,19 @@ cdef class gr_nf_fmpz_poly_ctx(gr_scalar_ctx):
1244
1244
def new (poly ) -> gr_nf_fmpz_poly_ctx:
1245
1245
"""Create a new context for number fields.
1246
1246
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
1260
1260
"""
1261
1261
poly = fmpz_poly(poly)
1262
1262
return gr_nf_fmpz_poly_ctx._new(poly )
You can’t perform that action at this time.
0 commit comments