Skip to content

Commit c94bb06

Browse files
alexchandler100Matthias Koeppe
authored andcommitted
sage -fiximports src/sage/{coding,groups}
1 parent f449b14 commit c94bb06

22 files changed

+54
-39
lines changed

src/sage/coding/bch_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
from sage.modules.free_module_element import vector
2828
from sage.misc.misc_c import prod
2929
from sage.categories.fields import Fields
30-
from sage.arith.all import gcd
31-
from sage.rings.all import Zmod
30+
from sage.arith.misc import GCD as gcd
31+
from sage.rings.finite_rings.integer_mod_ring import IntegerModRing as Zmod
3232

3333
from .cyclic_code import CyclicCode
3434
from .grs_code import GeneralizedReedSolomonCode

src/sage/coding/binary_code.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4103,7 +4103,7 @@ cdef class BinaryCodeClassifier:
41034103
m = BinaryCode(matrix(ZZ, rs))
41044104

41054105
m_aut_gp_gens, m_labeling, m_size, m_base = self._aut_gp_and_can_label(m)
4106-
from sage.arith.all import factorial
4106+
from sage.arith.misc import factorial
41074107
if True: # size*factorial(n-B.ncols) == m_size:
41084108

41094109
if len(m_aut_gp_gens) == 0:

src/sage/coding/code_bounds.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,12 @@
174174
# ****************************************************************************
175175

176176
from sage.libs.gap.libgap import libgap
177-
from sage.rings.all import QQ, RR, ZZ, RDF
177+
from sage.rings.rational_field import Q as QQ
178+
from sage.rings.real_mpfr import RR
179+
from sage.rings.integer_ring import Z as ZZ
180+
from sage.rings.real_double import RDF
178181
from sage.arith.misc import is_prime_power
179-
from sage.arith.all import binomial
182+
from sage.arith.misc import binomial
180183
from sage.misc.functional import sqrt, log
181184
from .delsarte_bounds import (delsarte_bound_hamming_space,
182185
delsarte_bound_additive_hamming_space)

src/sage/coding/code_constructions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
# ****************************************************************************
4242

4343
from sage.misc.misc_c import prod
44-
from sage.arith.all import quadratic_residues, gcd
44+
from sage.arith.misc import quadratic_residues
45+
from sage.arith.misc import GCD as gcd
4546

4647
from sage.structure.sequence import Sequence, Sequence_generic
4748

@@ -753,7 +754,7 @@ def ToricCode(P,F):
753754
754755
- David Joyner (07-2006)
755756
"""
756-
from sage.combinat.all import Tuples
757+
from sage.combinat.tuple import Tuples
757758
mset = [x for x in F if x != 0]
758759
d = len(P[0])
759760
pts = Tuples(mset, d).list()

src/sage/coding/cyclic_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
from copy import copy
4242
from sage.rings.integer import Integer
4343
from sage.categories.homset import Hom
44-
from sage.arith.all import gcd
44+
from sage.arith.misc import GCD as gcd
4545
from sage.modules.free_module_element import vector
4646
from sage.matrix.constructor import matrix
4747
from sage.misc.cachefunc import cached_method
48-
from sage.rings.all import Zmod
48+
from sage.rings.finite_rings.integer_mod_ring import IntegerModRing as Zmod
4949

5050

5151
def find_generator_polynomial(code, check=True):

src/sage/coding/delsarte_bounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def krawtchouk(n, q, l, x, check=True):
102102
...
103103
TypeError: no conversion of this rational to integer
104104
"""
105-
from sage.arith.all import binomial
105+
from sage.arith.misc import binomial
106106
from sage.arith.srange import srange
107107
# Use the expression in equation (55) of MacWilliams & Sloane, pg 151
108108
# We write jth term = some_factor * (j-1)th term
@@ -171,7 +171,7 @@ def eberlein(n, w, k, u, check=True):
171171
TypeError: either m or x-m must be an integer
172172
173173
"""
174-
from sage.arith.all import binomial
174+
from sage.arith.misc import binomial
175175
from sage.arith.srange import srange
176176

177177
if 2*w > n:
@@ -275,7 +275,7 @@ def _delsarte_cwc_LP_building(n, d, w, solver, isinteger):
275275
276276
"""
277277
from sage.numerical.mip import MixedIntegerLinearProgram
278-
from sage.arith.all import binomial
278+
from sage.arith.misc import binomial
279279

280280
p = MixedIntegerLinearProgram(maximization=True, solver=solver)
281281
A = p.new_variable(integer=isinteger, nonnegative=True)

src/sage/coding/information_set_decoder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
# http://www.gnu.org/licenses/
4141
#******************************************************************************
4242

43-
from sage.all import ZZ, Integer, vector, SageObject, binomial
43+
from sage.rings.integer_ring import Z as ZZ
44+
from sage.rings.integer import Integer
45+
from sage.modules.free_module_element import free_module_element as vector
46+
from sage.structure.sage_object import SageObject
47+
from sage.functions.other import binomial
4448
from .decoder import Decoder
4549

4650

src/sage/coding/linear_code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ class should inherit from this class. Also ``AbstractLinearCode`` should never
214214
from sage.matrix.matrix_space import MatrixSpace
215215
from sage.modules.free_module import VectorSpace
216216
from sage.modules.free_module_element import vector
217-
from sage.arith.all import GCD, binomial
217+
from sage.arith.misc import GCD
218+
from sage.arith.misc import binomial
218219
from sage.groups.all import SymmetricGroup
219220
from sage.groups.perm_gps.permgroup import PermutationGroup
220221
from sage.rings.rational_field import QQ

src/sage/groups/abelian_gps/abelian_group.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@
207207
from sage.structure.category_object import normalize_names
208208
from sage.structure.unique_representation import UniqueRepresentation
209209
from sage.rings.infinity import infinity
210-
from sage.arith.all import divisors, gcd, lcm
210+
from sage.arith.misc import divisors
211+
from sage.arith.misc import GCD as gcd
212+
from sage.arith.functions import lcm
211213
from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement
212214
from sage.misc.cachefunc import cached_method
213215
from sage.misc.misc_c import prod

src/sage/groups/abelian_gps/dual_abelian_group_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# (at your option) any later version.
5353
# https://www.gnu.org/licenses/
5454
# ****************************************************************************
55-
from sage.arith.all import LCM
55+
from sage.arith.functions import lcm as LCM
5656
from sage.groups.abelian_gps.element_base import AbelianGroupElementBase
5757

5858

0 commit comments

Comments
 (0)