Skip to content

Commit 97e9f79

Browse files
committed
remove unused variables
1 parent 45ce25d commit 97e9f79

23 files changed

+30
-71
lines changed

src/flint/types/acb.pyx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ cdef any_as_acb_or_notimplemented(x):
8787
return NotImplemented
8888
return t
8989

90-
"""
91-
cdef any_as_arb_or_acb(x):
92-
if typecheck(x, arb) or typecheck(x, acb):
93-
return x
94-
try:
95-
return arb(x)
96-
except (TypeError, ValueError):
97-
return acb(x)
98-
"""
90+
91+
# cdef any_as_arb_or_acb(x):
92+
# if typecheck(x, arb) or typecheck(x, acb):
93+
# return x
94+
# try:
95+
# return arb(x)
96+
# except (TypeError, ValueError):
97+
# return acb(x)
98+
9999

100100

101101
# Copied with modifications from sage/rings/complex_arb.pyx
@@ -2387,7 +2387,7 @@ cdef class acb(flint_scalar):
23872387
of terms to add in the hypergeometric series. This is just a tuning
23882388
parameter: a rigorous error bound is computed regardless of *n*.
23892389
"""
2390-
cdef long i, p, q, prec
2390+
cdef long i, p, q
23912391
cdef acb_ptr aa, bb
23922392
a = [any_as_acb(t) for t in a]
23932393
b = [any_as_acb(t) for t in b]

src/flint/types/acb_mat.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ cdef class acb_mat(flint_mat):
331331
return u
332332

333333
def __truediv__(s, t):
334-
cdef acb_mat u
335334
if typecheck(s, acb_mat):
336335
s, t = acb_mat_coerce_scalar(s, t)
337336
if s is NotImplemented:
@@ -597,7 +596,6 @@ cdef class acb_mat(flint_mat):
597596
return u
598597

599598
def __richcmp__(s, t, int op):
600-
cdef int stype, ttype
601599
cdef bint res
602600
if not (op == 2 or op == 3):
603601
raise ValueError("comparing matrices")

src/flint/types/acb_poly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ cdef class acb_poly(flint_poly):
363363
ValueError: roots() failed to converge: insufficient precision, or squareful input
364364
365365
"""
366-
cdef long prec, initial_prec, target_prec, isolated, maxiter, deg, i
366+
cdef long prec, initial_prec, isolated, maxiter, deg, i
367367
cdef acb_ptr roots
368368
cdef acb_poly_t tmp
369369
deg = s.degree()

src/flint/types/acb_series.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ cdef class acb_series(flint_series):
629629
of terms to add in the hypergeometric series. This is just a tuning
630630
parameter: a rigorous error bound is computed regardless of *n*.
631631
"""
632-
cdef long i, p, q, prec, cap
632+
cdef long i, p, q, cap
633633
cdef acb_poly_struct * aa
634634
cdef acb_poly_struct * bb
635635
a = [acb_series(t) for t in a]

src/flint/types/arb.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cdef arb_from_str(str s):
4343
raise ValueError("invalid string for arb()")
4444

4545
cdef arb_set_mpmath_mpf(arb_t x, obj):
46-
sgn, man, exp, bc = obj
46+
sgn, man, exp, _ = obj
4747

4848
if not man:
4949
if not exp:
@@ -2171,7 +2171,7 @@ cdef class arb(flint_scalar):
21712171
>>> showgood(lambda: arb(5).hypgeom([1,2,3],[5,4.5,6],regularized=True), dps=25)
21722172
3.886189282817193519132054e-5
21732173
"""
2174-
cdef long i, p, q, prec
2174+
cdef long i, p, q
21752175
cdef arb_ptr aa, bb
21762176
a = [any_as_arb(t) for t in a]
21772177
b = [any_as_arb(t) for t in b]

src/flint/types/arb_mat.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ cdef class arb_mat(flint_mat):
300300
return u
301301

302302
def __rmul__(s, t):
303-
cdef arb_mat u
304303
c, d = arb_mat_coerce_scalar(s, t)
305304
if c is not NotImplemented:
306305
return c._scalar_mul_(d)
@@ -317,7 +316,6 @@ cdef class arb_mat(flint_mat):
317316
return u
318317

319318
def __truediv__(s, t):
320-
cdef arb_mat u
321319
s, t = arb_mat_coerce_scalar(s, t)
322320
if s is NotImplemented:
323321
return s
@@ -669,7 +667,6 @@ cdef class arb_mat(flint_mat):
669667
return u
670668

671669
def __richcmp__(s, t, int op):
672-
cdef int stype, ttype
673670
cdef bint res
674671
if not (op == 2 or op == 3):
675672
raise ValueError("comparing matrices")

src/flint/types/arf.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ cdef class arf:
8989
return man, exp
9090

9191
def _repr_str(self):
92-
cdef fmpz man, exp
9392
if arf_is_zero(self.val):
9493
return "0.0"
9594
elif arf_is_finite(self.val):

src/flint/types/dirichlet.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ cdef class dirichlet_char(object):
163163
cdef fmpz m
164164
cdef ulong v
165165
m = fmpz(n) % self.G.q
166-
expo = self.G.exponent()
167166
v = dirichlet_chi(self.G.val, self.val, fmpz_get_ui(m.val))
168167
if v == DIRICHLET_CHI_NULL:
169168
return None

src/flint/types/fmpq.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ cdef class fmpq(flint_scalar):
470470
cdef int ntype = FMPZ_UNKNOWN
471471
cdef fmpq v
472472
cdef int success
473-
cdef long e
474473

475474
assert z is None
476475

src/flint/types/fmpq_mat.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ cdef class fmpq_mat(flint_mat):
233233
return u
234234

235235
def __mul__(s, t):
236-
cdef fmpz_mat u
237236
if typecheck(t, fmpq_mat):
238237
return (<fmpq_mat>s).__mul_fmpq_mat(t)
239238
elif typecheck(t, fmpz_mat):
@@ -248,7 +247,6 @@ cdef class fmpq_mat(flint_mat):
248247
return NotImplemented
249248

250249
def __rmul__(s, t):
251-
cdef fmpz_mat u
252250
if typecheck(t, fmpz_mat):
253251
return (<fmpq_mat>s).__mul_r_fmpz_mat(t)
254252
else:
@@ -433,7 +431,6 @@ cdef class fmpq_mat(flint_mat):
433431
60
434432
"""
435433
cdef fmpz_mat num
436-
cdef fmpz_den
437434
num = fmpz_mat(self.nrows(), self.ncols())
438435
den = fmpz()
439436
fmpq_mat_get_fmpz_mat_matwise(num.val, den.val, self.val)

0 commit comments

Comments
 (0)