From 8e357e18c02c6a859721354130726c97f87d4f3b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 18 Sep 2021 20:08:24 -0700 Subject: [PATCH] git grep -l 'all import matrix' src/sage | xargs sed -i.bak 's/sage[.]matrix[.]all import matrix *$/sage.matrix.constructor import matrix/' --- src/sage/algebras/quatalg/quaternion_algebra_element.pyx | 2 +- src/sage/arith/misc.py | 2 +- src/sage/calculus/functions.py | 2 +- src/sage/coding/self_dual_codes.py | 2 +- src/sage/combinat/cluster_algebra_quiver/cluster_seed.py | 4 ++-- .../cluster_algebra_quiver/quiver_mutation_type.py | 2 +- src/sage/combinat/matrices/latin.py | 2 +- src/sage/combinat/rsk.py | 2 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/hall_littlewood.py | 2 +- src/sage/combinat/sf/witt.py | 2 +- src/sage/combinat/subword_complex.py | 2 +- src/sage/combinat/symmetric_group_algebra.py | 2 +- src/sage/geometry/fan.py | 2 +- src/sage/geometry/point_collection.pyx | 2 +- .../geometry/polyhedron/combinatorial_polyhedron/base.pyx | 4 ++-- src/sage/groups/fqf_orthogonal.py | 2 +- src/sage/groups/matrix_gps/finitely_generated.py | 2 +- src/sage/interfaces/kenzo.py | 2 +- src/sage/interfaces/macaulay2.py | 2 +- src/sage/interfaces/matlab.py | 2 +- src/sage/libs/linkages/padics/fmpz_poly_unram.pxi | 2 +- src/sage/matrix/strassen.pyx | 2 +- src/sage/modular/modsym/heilbronn.pyx | 8 ++++---- src/sage/modular/pollack_stevens/dist.pyx | 2 +- src/sage/plot/plot3d/list_plot3d.py | 2 +- src/sage/rings/finite_rings/finite_field_base.pyx | 2 +- src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx | 2 +- src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx | 2 +- src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx | 2 +- src/sage/rings/padics/qadic_flint_CR.pyx | 2 +- src/sage/rings/padics/qadic_flint_FP.pyx | 2 +- src/sage/schemes/curves/affine_curve.py | 2 +- src/sage/schemes/curves/projective_curve.py | 2 +- src/sage/schemes/elliptic_curves/saturation.py | 2 +- .../schemes/hyperelliptic_curves/monsky_washnitzer.py | 2 +- src/sage/stats/hmm/hmm.pyx | 2 +- src/sage/symbolic/relation.py | 2 +- 38 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx index 5aea58d06bf..e97dd879375 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx @@ -40,7 +40,7 @@ from sage.rings.integer cimport Integer from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint from sage.rings.number_field.number_field_element cimport NumberFieldElement from sage.rings.all import PolynomialRing -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.libs.gmp.mpz cimport * diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py index 83f3a957d17..72b609c1b94 100644 --- a/src/sage/arith/misc.py +++ b/src/sage/arith/misc.py @@ -223,7 +223,7 @@ def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, is_complex = isinstance(z, ComplexNumber) n = degree+1 - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix M = matrix(ZZ, n, n+1+int(is_complex)) r = ZZ.one() << prec M[0, 0] = 1 diff --git a/src/sage/calculus/functions.py b/src/sage/calculus/functions.py index 0b8668f8521..6a06f755101 100644 --- a/src/sage/calculus/functions.py +++ b/src/sage/calculus/functions.py @@ -1,7 +1,7 @@ r""" Calculus functions """ -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.structure.element import is_Matrix from sage.structure.element import is_Vector from sage.symbolic.ring import is_SymbolicVariable diff --git a/src/sage/coding/self_dual_codes.py b/src/sage/coding/self_dual_codes.py index ca7f80cfc4f..199db9257a7 100644 --- a/src/sage/coding/self_dual_codes.py +++ b/src/sage/coding/self_dual_codes.py @@ -87,7 +87,7 @@ from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF from sage.matrix.matrix_space import MatrixSpace -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.matrix.constructor import block_diagonal_matrix from sage.rings.integer_ring import ZZ from sage.groups.perm_gps.permgroup import PermutationGroup diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index ec28a9887ef..59abf94470f 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -1545,7 +1545,7 @@ def g_matrix(self, show_warnings=True): ValueError: Unable to calculate g-vectors. Need to use g vectors. """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix if self._use_g_vec: return copy(self._G) elif self._use_fpolys and self._cluster: # This only calls g_vector when it will not create a loop. @@ -3036,7 +3036,7 @@ def universal_extension(self): "for finite type cluster algebras at a " "bipartite initial cluster") - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from sage.combinat.root_system.cartan_matrix import CartanMatrix A = 2 - self.b_matrix().apply_map(abs).transpose() diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py index b819aed8966..ef3eb1e6d5d 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py @@ -27,7 +27,7 @@ from sage.graphs.all import Graph, DiGraph from sage.arith.all import binomial, euler_phi from sage.all import prod -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix class QuiverMutationTypeFactory(SageObject): diff --git a/src/sage/combinat/matrices/latin.py b/src/sage/combinat/matrices/latin.py index 45be6c01400..367facaa301 100644 --- a/src/sage/combinat/matrices/latin.py +++ b/src/sage/combinat/matrices/latin.py @@ -129,7 +129,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.rings.integer_ring import ZZ from sage.rings.all import Integer from sage.matrix.matrix_integer_dense import Matrix_integer_dense diff --git a/src/sage/combinat/rsk.py b/src/sage/combinat/rsk.py index 9bc3f1d8720..9298575d580 100644 --- a/src/sage/combinat/rsk.py +++ b/src/sage/combinat/rsk.py @@ -170,7 +170,7 @@ from bisect import bisect_left, bisect_right from sage.structure.element import is_Matrix -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.rings.integer_ring import ZZ diff --git a/src/sage/combinat/sf/dual.py b/src/sage/combinat/sf/dual.py index 83f3564c246..c98d02324d8 100644 --- a/src/sage/combinat/sf/dual.py +++ b/src/sage/combinat/sf/dual.py @@ -18,7 +18,7 @@ #***************************************************************************** from sage.categories.morphism import SetMorphism from sage.categories.homset import Hom -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix import sage.combinat.partition import sage.data_structures.blas_dict as blas from . import classical diff --git a/src/sage/combinat/sf/hall_littlewood.py b/src/sage/combinat/sf/hall_littlewood.py index e2a2f18f775..4fd478c8f94 100644 --- a/src/sage/combinat/sf/hall_littlewood.py +++ b/src/sage/combinat/sf/hall_littlewood.py @@ -22,7 +22,7 @@ from sage.libs.symmetrica.all import hall_littlewood from . import sfa import sage.combinat.partition -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.categories.morphism import SetMorphism from sage.categories.homset import Hom from sage.rings.rational_field import QQ diff --git a/src/sage/combinat/sf/witt.py b/src/sage/combinat/sf/witt.py index 625f76e8521..fbc7979936b 100644 --- a/src/sage/combinat/sf/witt.py +++ b/src/sage/combinat/sf/witt.py @@ -18,7 +18,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** from . import multiplicative -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix class SymmetricFunctionAlgebra_witt(multiplicative.SymmetricFunctionAlgebra_multiplicative): r""" diff --git a/src/sage/combinat/subword_complex.py b/src/sage/combinat/subword_complex.py index eb3a06fb6b4..f59113ef04f 100644 --- a/src/sage/combinat/subword_complex.py +++ b/src/sage/combinat/subword_complex.py @@ -1529,7 +1529,7 @@ def is_root_independent(self): sage: SC.is_root_independent() True """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix M = matrix(self.greedy_facet(side="negative").root_configuration()) return M.rank() == max(M.ncols(), M.nrows()) diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index ee60bb1e255..6263dfea7cb 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -21,7 +21,7 @@ from sage.categories.weyl_groups import WeylGroups from sage.rings.all import QQ, PolynomialRing from sage.arith.all import factorial -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.modules.free_module_element import vector from sage.groups.perm_gps.permgroup_element import PermutationGroupElement from sage.misc.persist import register_unpickle_override diff --git a/src/sage/geometry/fan.py b/src/sage/geometry/fan.py index 164371a1c8a..04a0a73400d 100644 --- a/src/sage/geometry/fan.py +++ b/src/sage/geometry/fan.py @@ -251,7 +251,7 @@ from sage.geometry.toric_lattice import ToricLattice, is_ToricLattice from sage.geometry.toric_plotter import ToricPlotter from sage.graphs.digraph import DiGraph -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.cachefunc import cached_method from sage.misc.all import walltime, prod from sage.modules.all import vector, span diff --git a/src/sage/geometry/point_collection.pyx b/src/sage/geometry/point_collection.pyx index 2172b4d7291..8b2f7e26828 100644 --- a/src/sage/geometry/point_collection.pyx +++ b/src/sage/geometry/point_collection.pyx @@ -80,7 +80,7 @@ from sage.structure.sage_object cimport SageObject from sage.structure.richcmp cimport richcmp_not_equal, richcmp from sage.geometry.toric_lattice import ToricLattice -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.latex import latex diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index d4eac87cee0..de1037ebe99 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -391,7 +391,7 @@ cdef class CombinatorialPolyhedron(SageObject): self._n_Hrepresentation = len(facets) far_face = tuple(i for i in range(len(Vrep) - 1)) self._dimension = data.dim() - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from sage.rings.all import ZZ data = matrix(ZZ, data.incidence_matrix().rows() + [[ZZ.one() for _ in range(len(facets))]]) @@ -442,7 +442,7 @@ cdef class CombinatorialPolyhedron(SageObject): if not isinstance(data, Matrix_integer_dense): from sage.rings.all import ZZ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix data = matrix(ZZ, data, sparse=False) assert isinstance(data, Matrix_integer_dense), "conversion to ``Matrix_integer_dense`` didn't work" diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index b4ac8242f96..184efa9be0b 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -52,7 +52,7 @@ from sage.groups.abelian_gps.abelian_aut import AbelianGroupAutomorphismGroup_subgroup, AbelianGroupAutomorphism, AbelianGroupAutomorphismGroup_gap from sage.modules.torsion_quadratic_module import TorsionQuadraticModule from sage.rings.integer_ring import ZZ -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.categories.action import Action diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py index d4d9849684d..cef211ea07c 100644 --- a/src/sage/groups/matrix_gps/finitely_generated.py +++ b/src/sage/groups/matrix_gps/finitely_generated.py @@ -66,7 +66,7 @@ from sage.rings.all import QQbar from sage.structure.element import is_Matrix from sage.matrix.matrix_space import MatrixSpace, is_MatrixSpace -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.structure.sequence import Sequence from sage.misc.cachefunc import cached_method from sage.modules.free_module_element import vector diff --git a/src/sage/interfaces/kenzo.py b/src/sage/interfaces/kenzo.py index 767d7525bd5..7fc8ce6c537 100644 --- a/src/sage/interfaces/kenzo.py +++ b/src/sage/interfaces/kenzo.py @@ -33,7 +33,7 @@ from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.homology.chain_complex import ChainComplex from sage.topology.simplicial_set import AbstractSimplex, SimplicialSet diff --git a/src/sage/interfaces/macaulay2.py b/src/sage/interfaces/macaulay2.py index 3b33827969e..1d942d497d7 100644 --- a/src/sage/interfaces/macaulay2.py +++ b/src/sage/interfaces/macaulay2.py @@ -1713,7 +1713,7 @@ def _matrix_(self, R): sage: matrix(ZZ, m.transpose()).dimensions() # optional - macaulay2 (0, 2) """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix m = matrix(R, self.entries()._sage_()) if not m.nrows(): return matrix(R, 0, self.numcols()._sage_()) diff --git a/src/sage/interfaces/matlab.py b/src/sage/interfaces/matlab.py index 5f72363b520..986dc665b39 100644 --- a/src/sage/interfaces/matlab.py +++ b/src/sage/interfaces/matlab.py @@ -343,7 +343,7 @@ def _matrix_(self, R): 50 x 50 dense matrix over Real Field with 53 bits of precision """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix matlab = self.parent() entries = matlab.strip_answer(matlab.eval("mat2str({0})".format(self.name()))) entries = entries.strip()[1:-1].replace(';', ' ') diff --git a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi index 81b47988b39..b797782c657 100644 --- a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi +++ b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi @@ -864,5 +864,5 @@ cdef cmatrix_mod_pn(celement a, long aprec, long valshift, PowComputer_ prime_po L[-1].append(zero) fmpz_poly_shift_left(prime_pow.poly_matmod, prime_pow.poly_matmod, 1) creduce(prime_pow.poly_matmod, prime_pow.poly_matmod, aprec, prime_pow) - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix return matrix(R, deg, deg, L) diff --git a/src/sage/matrix/strassen.pyx b/src/sage/matrix/strassen.pyx index c5c53c32640..c42f131cfa0 100644 --- a/src/sage/matrix/strassen.pyx +++ b/src/sage/matrix/strassen.pyx @@ -801,7 +801,7 @@ def test(n, m, R, c=2): 3 True 4 True """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix A = matrix(R,n,m,range(n*m)) B = A.__copy__(); B._echelon_in_place_classical() C = A.__copy__(); C._echelon_strassen(c) diff --git a/src/sage/modular/modsym/heilbronn.pyx b/src/sage/modular/modsym/heilbronn.pyx index 5995ef1bb1b..1c27f95d868 100644 --- a/src/sage/modular/modsym/heilbronn.pyx +++ b/src/sage/modular/modsym/heilbronn.pyx @@ -551,7 +551,7 @@ def hecke_images_gamma0_weight2(int u, int v, int N, indices, R): # Create a zero dense matrix over QQ with len(indices) rows # and #P^1(N) columns. cdef Matrix_rational_dense T - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from sage.rings.rational_field import QQ T = matrix(QQ, len(indices), len(P1), sparse=False) original_base_ring = R.base_ring() @@ -684,7 +684,7 @@ def hecke_images_nonquad_character_weight2(int u, int v, int N, indices, chi, R) # Create a zero dense matrix over K with len(indices) rows # and #P^1(N) columns. cdef Matrix_cyclo_dense T - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix T = matrix(K, len(indices), len(P1), sparse=False) cdef Py_ssize_t i, j @@ -778,7 +778,7 @@ def hecke_images_quad_character_weight2(int u, int v, int N, indices, chi, R): # Create a zero dense matrix over QQ with len(indices) rows # and #P^1(N) columns. cdef Matrix_rational_dense T - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix T = matrix(QQ, len(indices), len(P1), sparse=False) if R.base_ring() != QQ: @@ -868,7 +868,7 @@ def hecke_images_gamma0_weight_k(int u, int v, int i, int N, int k, indices, R): # So we create a zero dense matrix over QQ with len(indices) rows # and #P^1(N) * (k-1) columns. cdef Matrix_rational_dense T - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from sage.rings.rational_field import QQ T = matrix(QQ, len(indices), len(P1)*(k-1), sparse=False) diff --git a/src/sage/modular/pollack_stevens/dist.pyx b/src/sage/modular/pollack_stevens/dist.pyx index dd3e154b59b..65942454937 100644 --- a/src/sage/modular/pollack_stevens/dist.pyx +++ b/src/sage/modular/pollack_stevens/dist.pyx @@ -37,7 +37,7 @@ from sage.arith.all import binomial, bernoulli from sage.modules.free_module_element import vector, zero_vector from sage.matrix.matrix cimport Matrix from sage.matrix.matrix_space import MatrixSpace -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.prandom import random from sage.functions.other import floor from sage.structure.element cimport RingElement, Element diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py index 875165ee972..ba6ce73a0bd 100644 --- a/src/sage/plot/plot3d/list_plot3d.py +++ b/src/sage/plot/plot3d/list_plot3d.py @@ -3,7 +3,7 @@ """ from sage.structure.element import is_Matrix -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.rings.all import RDF from sage.misc.superseded import deprecation diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 35da225308b..39e73253dcd 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -1257,7 +1257,7 @@ cdef class FiniteField(Field): inclusion_map = self.coerce_map_from(base) from sage.modules.free_module_element import vector - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from .maps_finite_field import ( MorphismVectorSpaceToFiniteField, MorphismFiniteFieldToVectorSpace) diff --git a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx index 225c52efa83..2055d4d46c2 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx @@ -1972,7 +1972,7 @@ cdef class pAdicZZpXCAElement(pAdicZZpXElement): [1590 1375 1695 1032 2358] [2415 590 2370 2970 1032] """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix # this may be the wrong precision when ram_prec_cap is not divisible by e. R = IntegerModRing(self.prime_pow.pow_Integer(self.prime_pow.capdiv(self.absprec))) n = self.prime_pow.deg diff --git a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx index db39fab2b60..8d44034b121 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx @@ -2859,7 +2859,7 @@ cdef class pAdicZZpXCRElement(pAdicZZpXElement): if self.valuation_c() < 0: raise ValueError("self must be integral") n = self.prime_pow.deg - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix if self._is_exact_zero(): from sage.rings.integer_ring import IntegerRing return matrix(IntegerRing(), n, n) diff --git a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx index 9c0bcff4f69..c58954582ea 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx @@ -1032,7 +1032,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXElement): [1590 1375 1695 1032 2358] [2415 590 2370 2970 1032] """ - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix R = IntegerModRing(self.prime_pow.pow_Integer(self.prime_pow.prec_cap)) n = self.prime_pow.deg L = [] diff --git a/src/sage/rings/padics/qadic_flint_CR.pyx b/src/sage/rings/padics/qadic_flint_CR.pyx index 2568578a780..eaedb7a6c12 100644 --- a/src/sage/rings/padics/qadic_flint_CR.pyx +++ b/src/sage/rings/padics/qadic_flint_CR.pyx @@ -64,7 +64,7 @@ cdef class qAdicCappedRelativeElement(CRElement): if self.ordp < 0: raise ValueError("self must be integral") if exactzero(self.ordp): - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix return matrix(ZZ, self.prime_pow.deg, self.prime_pow.deg) else: return cmatrix_mod_pn(self.unit, self.ordp + self.relprec, self.ordp, self.prime_pow) diff --git a/src/sage/rings/padics/qadic_flint_FP.pyx b/src/sage/rings/padics/qadic_flint_FP.pyx index 2b6730c7770..949e132199c 100644 --- a/src/sage/rings/padics/qadic_flint_FP.pyx +++ b/src/sage/rings/padics/qadic_flint_FP.pyx @@ -66,7 +66,7 @@ cdef class qAdicFloatingPointElement(FPElement): if self.ordp < 0: raise ValueError("self must be integral") if very_pos_val(self.ordp): - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix return matrix(ZZ, self.prime_pow.deg, self.prime_pow.deg) else: return cmatrix_mod_pn(self.unit, self.ordp + self.prime_pow.prec_cap, self.ordp, self.prime_pow) diff --git a/src/sage/schemes/curves/affine_curve.py b/src/sage/schemes/curves/affine_curve.py index 9fd99a3b3fc..d0d24f4419b 100644 --- a/src/sage/schemes/curves/affine_curve.py +++ b/src/sage/schemes/curves/affine_curve.py @@ -135,7 +135,7 @@ from sage.categories.homset import Hom, End, hom from sage.categories.number_fields import NumberFields -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.rings.all import degree_lowest_rational_function from sage.rings.number_field.number_field import NumberField diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index 0e6ba6a1e4b..291369dab8d 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -145,7 +145,7 @@ from sage.categories.homset import Hom, End from sage.interfaces.all import singular -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.all import add, sage_eval from sage.rings.all import degree_lowest_rational_function, IntegerRing diff --git a/src/sage/schemes/elliptic_curves/saturation.py b/src/sage/schemes/elliptic_curves/saturation.py index d8037db8877..14b172cacbb 100644 --- a/src/sage/schemes/elliptic_curves/saturation.py +++ b/src/sage/schemes/elliptic_curves/saturation.py @@ -463,7 +463,7 @@ def p_saturation(self, Plist, p, sieve=True): if verbose: print("Using sieve method to saturate...") - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix from sage.sets.primes import Primes A = matrix(GF(p), 0, n) diff --git a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py index 8bf87c92827..af3f5e625d5 100644 --- a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +++ b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py @@ -49,7 +49,7 @@ from sage.arith.all import binomial, integer_ceil as ceil from sage.functions.log import log from sage.functions.other import floor -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.cachefunc import cached_method from sage.misc.misc import newton_method_sizes from sage.misc.profiler import Profiler diff --git a/src/sage/stats/hmm/hmm.pyx b/src/sage/stats/hmm/hmm.pyx index cb3810dc3fe..568b601ac30 100644 --- a/src/sage/stats/hmm/hmm.pyx +++ b/src/sage/stats/hmm/hmm.pyx @@ -36,7 +36,7 @@ from cysignals.signals cimport sig_on, sig_off from sage.finance.time_series cimport TimeSeries from sage.structure.element import is_Matrix -from sage.matrix.all import matrix +from sage.matrix.constructor import matrix from sage.misc.randstate cimport current_randstate, randstate from cpython.object cimport PyObject_RichCompare diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py index 7c767901baf..da9dcc0a8b1 100644 --- a/src/sage/symbolic/relation.py +++ b/src/sage/symbolic/relation.py @@ -1572,7 +1572,7 @@ def solve_mod(eqns, modulus, solution_dict=False): from sage.symbolic.expression import is_Expression from sage.misc.all import cartesian_product_iterator from sage.modules.free_module_element import vector - from sage.matrix.all import matrix + from sage.matrix.constructor import matrix if not isinstance(eqns, (list, tuple)): eqns = [eqns]