Skip to content

Commit fddd81b

Browse files
committed
rename __poly -> _poly
1 parent 117880c commit fddd81b

21 files changed

+397
-397
lines changed

src/sage/libs/arb/arith.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ def hilbert_class_polynomial(D):
8181
cdef long n = D
8282
cdef Polynomial_integer_dense_flint poly
8383
poly = PolynomialRing(ZZ, "x", implementation="FLINT")()
84-
acb_modular_hilbert_class_poly(poly.__poly, n)
84+
acb_modular_hilbert_class_poly(poly._poly, n)
8585
return poly

src/sage/matrix/matrix_complex_ball_dense.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ cdef class Matrix_complex_ball_dense(Matrix_dense):
664664
Pol = polynomial_ring_constructor._single_variate(self.base_ring(), var)
665665
cdef Polynomial_complex_arb res = Polynomial_complex_arb(Pol)
666666
sig_on()
667-
acb_mat_charpoly(res.__poly, self.value, prec(self))
667+
acb_mat_charpoly(res._poly, self.value, prec(self))
668668
sig_off()
669669
return res
670670

src/sage/matrix/matrix_integer_dense.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,12 +1371,12 @@ cdef class Matrix_integer_dense(Matrix_dense):
13711371
if algorithm == 'flint':
13721372
g = (<Polynomial_integer_dense_flint> PolynomialRing(ZZ, names=var).gen())._new()
13731373
sig_on()
1374-
fmpz_mat_charpoly(g.__poly, self._matrix)
1374+
fmpz_mat_charpoly(g._poly, self._matrix)
13751375
sig_off()
13761376
elif algorithm == 'linbox':
13771377
g = (<Polynomial_integer_dense_flint> PolynomialRing(ZZ, names=var).gen())._new()
13781378
sig_on()
1379-
linbox_fmpz_mat_charpoly(g.__poly, self._matrix)
1379+
linbox_fmpz_mat_charpoly(g._poly, self._matrix)
13801380
sig_off()
13811381
elif algorithm == 'generic':
13821382
g = Matrix_dense.charpoly(self, var)
@@ -1460,7 +1460,7 @@ cdef class Matrix_integer_dense(Matrix_dense):
14601460
if algorithm == 'linbox':
14611461
g = (<Polynomial_integer_dense_flint> PolynomialRing(ZZ, names=var).gen())._new()
14621462
sig_on()
1463-
linbox_fmpz_mat_minpoly(g.__poly, self._matrix)
1463+
linbox_fmpz_mat_minpoly(g._poly, self._matrix)
14641464
sig_off()
14651465
elif algorithm == 'generic':
14661466
g = Matrix_dense.minpoly(self, var)

src/sage/matrix/matrix_integer_sparse.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,10 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
869869
sig_off()
870870

871871
cdef size_t i
872-
fmpz_poly_fit_length(g.__poly, p.size())
872+
fmpz_poly_fit_length(g._poly, p.size())
873873
for i in range(p.size()):
874-
fmpz_poly_set_coeff_mpz(g.__poly, i, p[0][i].get_mpz_const())
875-
_fmpz_poly_set_length(g.__poly, p.size())
874+
fmpz_poly_set_coeff_mpz(g._poly, i, p[0][i].get_mpz_const())
875+
_fmpz_poly_set_length(g._poly, p.size())
876876

877877
del M
878878
del p
@@ -968,10 +968,10 @@ cdef class Matrix_integer_sparse(Matrix_sparse):
968968
sig_off()
969969

970970
cdef size_t i
971-
fmpz_poly_fit_length(g.__poly, p.size())
971+
fmpz_poly_fit_length(g._poly, p.size())
972972
for i in range(p.size()):
973-
fmpz_poly_set_coeff_mpz(g.__poly, i, p[0][i].get_mpz_const())
974-
_fmpz_poly_set_length(g.__poly, p.size())
973+
fmpz_poly_set_coeff_mpz(g._poly, i, p[0][i].get_mpz_const())
974+
_fmpz_poly_set_length(g._poly, p.size())
975975

976976
del M
977977
del p

src/sage/misc/cython.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,9 @@ def compile_and_load(code, **kwds):
646646
....: cdef Polynomial_rational_flint res = f._new()
647647
....: cdef unsigned long k
648648
....: cdef Rational z = Rational(0)
649-
....: for k in range(fmpq_poly_length(f.__poly)):
650-
....: fmpq_poly_get_coeff_mpq(z.value, f.__poly, k)
651-
....: fmpq_poly_set_coeff_mpq(res.__poly, n*k, z.value)
649+
....: for k in range(fmpq_poly_length(f._poly)):
650+
....: fmpq_poly_get_coeff_mpq(z.value, f._poly, k)
651+
....: fmpq_poly_set_coeff_mpq(res._poly, n*k, z.value)
652652
....: return res
653653
....: '''
654654
sage: module = compile_and_load(code) # long time

src/sage/rings/complex_arb.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
874874
cdef RealBall rb
875875
cdef ComplexBall cb
876876
acb_poly_init(rounded_poly)
877-
cdef long deg = acb_poly_degree(poly.__poly)
877+
cdef long deg = acb_poly_degree(poly._poly)
878878
if deg < 0:
879879
raise ArithmeticError("taking the roots of the zero polynomial")
880880
cdef acb_ptr roots = _acb_vec_init(deg)
@@ -883,7 +883,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
883883
while ((isolated < deg or any(acb_rel_accuracy_bits(&roots[i]) < tgtprec
884884
for i in range(deg)))
885885
and prec < maxprec):
886-
acb_poly_set_round(rounded_poly, poly.__poly, prec)
886+
acb_poly_set_round(rounded_poly, poly._poly, prec)
887887
maxiter = min(max(deg, 32), prec)
888888
if (prec == initial_prec):
889889
isolated = acb_poly_find_roots(roots, rounded_poly, NULL, maxiter, prec)

src/sage/rings/padics/pow_computer_flint.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ cdef class PowComputer_flint_1step(PowComputer_flint):
208208
209209
"""
210210
cdef Polynomial_integer_dense_flint poly = _poly
211-
cdef long length = fmpz_poly_length(poly.__poly)
211+
cdef long length = fmpz_poly_length(poly._poly)
212212

213213
cdef Py_ssize_t i
214214

@@ -268,10 +268,10 @@ cdef class PowComputer_flint_1step(PowComputer_flint):
268268
PowComputer_flint.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, _poly, shift_seed)
269269

270270
cdef Polynomial_integer_dense_flint poly = _poly
271-
cdef long length = fmpz_poly_length(poly.__poly)
271+
cdef long length = fmpz_poly_length(poly._poly)
272272
self.deg = length - 1
273273

274-
fmpz_poly_set(self.modulus, poly.__poly)
274+
fmpz_poly_set(self.modulus, poly._poly)
275275

276276
cdef Py_ssize_t i
277277
cdef fmpz* coeffs = self.modulus.coeffs
@@ -427,9 +427,9 @@ cdef class PowComputer_flint_1step(PowComputer_flint):
427427
x = R.gen()
428428
cdef Polynomial_integer_dense_flint ans = (<Polynomial_integer_dense_flint?>x)._new()
429429
if _n is None:
430-
fmpz_poly_set(ans.__poly, self.modulus)
430+
fmpz_poly_set(ans._poly, self.modulus)
431431
else:
432-
fmpz_poly_set(ans.__poly, self.get_modulus(_n)[0])
432+
fmpz_poly_set(ans._poly, self.get_modulus(_n)[0])
433433
return ans
434434

435435
cdef _new_fmpz_poly(self, fmpz_poly_t value, var='x'):
@@ -440,7 +440,7 @@ cdef class PowComputer_flint_1step(PowComputer_flint):
440440
R = ZZ[var]
441441
x = R.gen()
442442
cdef Polynomial_integer_dense_flint ans = (<Polynomial_integer_dense_flint?>x)._new()
443-
fmpz_poly_set(ans.__poly, value)
443+
fmpz_poly_set(ans._poly, value)
444444
return ans
445445

446446
cdef class PowComputer_flint_unram(PowComputer_flint_1step):

src/sage/rings/polynomial/hilbert.pyx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ cdef bint HilbertBaseCase(Polynomial_integer_dense_flint fhs, Node D, tuple w):
170170
cdef int e
171171
# First, the easiest cases:
172172
if not D.Id: # The zero ideal
173-
fmpz_poly_set_coeff_si(fhs.__poly, 0, 1) # = PR(1)
173+
fmpz_poly_set_coeff_si(fhs._poly, 0, 1) # = PR(1)
174174
return True
175175
cdef ETuple m = <ETuple>PyList_GET_ITEM(D.Id, len(D.Id)-1)
176176
if m._nonzero == 0: # The one ideal
@@ -183,18 +183,18 @@ cdef bint HilbertBaseCase(Polynomial_integer_dense_flint fhs, Node D, tuple w):
183183
if m._nonzero == 1 and m._data[1] == 1:
184184
fmpz_poly_init(poly_tmp)
185185
fmpz_poly_set_coeff_si(poly_tmp, 0, 1)
186-
fmpz_poly_set_coeff_si(fhs.__poly, 0, 1) # = PR(1)
186+
fmpz_poly_set_coeff_si(fhs._poly, 0, 1) # = PR(1)
187187
if w is None:
188188
for i in range(len(D.Id)):
189189
exp = (<ETuple>PyList_GET_ITEM(D.Id, i)).unweighted_degree()
190190
fmpz_poly_set_coeff_si(poly_tmp, exp, -1)
191-
fmpz_poly_mul(fhs.__poly, fhs.__poly, poly_tmp)
191+
fmpz_poly_mul(fhs._poly, fhs._poly, poly_tmp)
192192
fmpz_poly_set_coeff_si(poly_tmp, exp, 0)
193193
else:
194194
for i in range(len(D.Id)):
195195
exp = (<ETuple>PyList_GET_ITEM(D.Id, i)).weighted_degree(w)
196196
fmpz_poly_set_coeff_si(poly_tmp, exp, -1)
197-
fmpz_poly_mul(fhs.__poly, fhs.__poly, poly_tmp)
197+
fmpz_poly_mul(fhs._poly, fhs._poly, poly_tmp)
198198
fmpz_poly_set_coeff_si(poly_tmp, exp, 0)
199199
fmpz_poly_clear(poly_tmp)
200200
return True # PR.prod([(1-t**degree(m,w)) for m in D.Id])
@@ -210,18 +210,18 @@ cdef bint HilbertBaseCase(Polynomial_integer_dense_flint fhs, Node D, tuple w):
210210
# The ideal is generated by some powers of single variables, i.e., it splits.
211211
fmpz_poly_init(poly_tmp)
212212
fmpz_poly_set_coeff_si(poly_tmp, 0, 1)
213-
fmpz_poly_set_coeff_si(fhs.__poly, 0, 1) # = PR(1)
213+
fmpz_poly_set_coeff_si(fhs._poly, 0, 1) # = PR(1)
214214
if w is None:
215215
for i in range(len(D.Id)):
216216
exp = (<ETuple>PyList_GET_ITEM(D.Id, i)).unweighted_degree()
217217
fmpz_poly_set_coeff_si(poly_tmp, exp, -1)
218-
fmpz_poly_mul(fhs.__poly, fhs.__poly, poly_tmp)
218+
fmpz_poly_mul(fhs._poly, fhs._poly, poly_tmp)
219219
fmpz_poly_set_coeff_si(poly_tmp, exp, 0)
220220
else:
221221
for i in range(len(D.Id)):
222222
exp = (<ETuple>PyList_GET_ITEM(D.Id, i)).weighted_degree(w)
223223
fmpz_poly_set_coeff_si(poly_tmp, exp, -1)
224-
fmpz_poly_mul(fhs.__poly, fhs.__poly, poly_tmp)
224+
fmpz_poly_mul(fhs._poly, fhs._poly, poly_tmp)
225225
fmpz_poly_set_coeff_si(poly_tmp, exp, 0)
226226
fmpz_poly_clear(poly_tmp)
227227
return True # PR.prod([(1-t**degree(m,w)) for m in D.Id])
@@ -278,8 +278,8 @@ cdef bint HilbertBaseCase(Polynomial_integer_dense_flint fhs, Node D, tuple w):
278278
fmpz_poly_mul(SecondSummand, SecondSummand, poly_tmp)
279279
fmpz_poly_set_coeff_si(poly_tmp, exp, 0)
280280
fmpz_poly_clear(poly_tmp)
281-
fmpz_poly_add(fhs.__poly, fhs.__poly, FirstSummand)
282-
fmpz_poly_add(fhs.__poly, fhs.__poly, SecondSummand)
281+
fmpz_poly_add(fhs._poly, fhs._poly, FirstSummand)
282+
fmpz_poly_add(fhs._poly, fhs._poly, SecondSummand)
283283
fmpz_poly_clear(FirstSummand)
284284
fmpz_poly_clear(SecondSummand)
285285
return True
@@ -532,11 +532,11 @@ def first_hilbert_series(I, grading=None, return_grading=False):
532532
if AN.Back.Right is None:
533533
AN = AN.Back
534534
#~ fhs *= AN.LMult
535-
fmpz_poly_mul(fhs.__poly, fhs.__poly, AN.LMult)
535+
fmpz_poly_mul(fhs._poly, fhs._poly, AN.LMult)
536536
got_result = True
537537
else:
538-
fmpz_poly_set(AN.Back.LeftFHS, fhs.__poly)
539-
fmpz_poly_set_si(fhs.__poly, 0)
538+
fmpz_poly_set(AN.Back.LeftFHS, fhs._poly)
539+
fmpz_poly_set_si(fhs._poly, 0)
540540
AN = AN.Back.Right
541541
AN.Back.Left = None
542542
got_result = HilbertBaseCase(fhs, AN, w)
@@ -545,8 +545,8 @@ def first_hilbert_series(I, grading=None, return_grading=False):
545545
AN.Right = None
546546
#~ fhs = AN.LMult*AN.LeftFHS + AN.RMult*fhs
547547
fmpz_poly_mul(AN.LMult, AN.LMult, AN.LeftFHS)
548-
fmpz_poly_mul(AN.RMult, AN.RMult, fhs.__poly)
549-
fmpz_poly_add(fhs.__poly, AN.LMult, AN.RMult)
548+
fmpz_poly_mul(AN.RMult, AN.RMult, fhs._poly)
549+
fmpz_poly_add(fhs._poly, AN.LMult, AN.RMult)
550550
got_result = True
551551

552552
def hilbert_poincare_series(I, grading=None):

src/sage/rings/polynomial/polynomial_complex_arb.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ from sage.libs.arb.acb_poly cimport *
22
from sage.rings.polynomial.polynomial_element cimport Polynomial
33

44
cdef class Polynomial_complex_arb(Polynomial):
5-
cdef acb_poly_struct[1] __poly # https://github.com/cython/cython/issues/1984
5+
cdef acb_poly_struct[1] _poly # https://github.com/cython/cython/issues/1984
66
cdef Polynomial_complex_arb _new(self)

0 commit comments

Comments
 (0)