Skip to content

Commit

Permalink
Replace relative cimports
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Nov 1, 2023
1 parent eb8417b commit 1a50a80
Show file tree
Hide file tree
Showing 89 changed files with 166 additions and 170 deletions.
8 changes: 4 additions & 4 deletions src/sage/libs/arb/arith.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Arithmetic functions using the arb library
# http://www.gnu.org/licenses/
#*****************************************************************************

from ..flint.types cimport ulong
from ..flint.fmpq cimport fmpq_t, fmpq_init, fmpq_clear, fmpq_get_mpq
from .bernoulli cimport bernoulli_fmpq_ui
from .acb_modular cimport acb_modular_hilbert_class_poly
from sage.libs.flint.types cimport ulong
from sage.libs.flint.fmpq cimport fmpq_t, fmpq_init, fmpq_clear, fmpq_get_mpq
from sage.libs.arb.bernoulli cimport bernoulli_fmpq_ui
from sage.libs.arb.acb_modular cimport acb_modular_hilbert_class_poly
from sage.rings.rational cimport Rational
from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/arb/bernoulli.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# distutils: libraries = gmp flint ARB_LIBRARY
# distutils: depends = bernoulli.h

from ..flint.types cimport fmpq_t, ulong
from sage.libs.flint.types cimport fmpq_t, ulong

# bernoulli.h
cdef extern from "arb_wrap.h":
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/coxeter3/coxeter.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#*****************************************************************************

from sage.structure.sage_object cimport SageObject
from .decl cimport *
from sage.libs.coxeter3.decl cimport *

cdef class String:
cdef c_String x
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/coxeter3/coxeter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Low level part of the interface to Fokko Ducloux's Coxeter 3 library
# https://www.gnu.org/licenses/
# ****************************************************************************

from .decl cimport *
from sage.libs.coxeter3.decl cimport *
from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE
from sage.cpython.string cimport str_to_bytes, bytes_to_str

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/eclib/homspace.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..eclib cimport homspace
from sage.libs.eclib cimport homspace

cdef class ModularSymbols:
cdef homspace* H
4 changes: 2 additions & 2 deletions src/sage/libs/eclib/homspace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ from cysignals.signals cimport sig_on, sig_off
from cython.operator cimport dereference as deref
from cython.operator cimport preincrement as inc

from ..eclib cimport svec, mat, smat
from .mat cimport MatrixFactory
from sage.libs.eclib cimport svec, mat, smat
from sage.libs.eclib.mat cimport MatrixFactory

from sage.matrix.matrix_space import MatrixSpace
from sage.rings.integer_ring import ZZ
Expand Down
6 changes: 1 addition & 5 deletions src/sage/libs/eclib/mat.pxd
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from ..eclib cimport mat
from sage.libs.eclib cimport mat

cdef class Matrix:
cdef mat* M

cdef class MatrixFactory:
cdef new_matrix(self, mat M) noexcept




2 changes: 1 addition & 1 deletion src/sage/libs/eclib/mat.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Cremona matrices
"""

from ..eclib cimport scalar, addscalar
from sage.libs.eclib cimport scalar, addscalar

from sage.matrix.matrix_space import MatrixSpace
from sage.rings.integer_ring import ZZ
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/eclib/newforms.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..eclib cimport newforms
from sage.libs.eclib cimport newforms

cdef class ECModularSymbol:
cdef newforms* nfs
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/eclib/newforms.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Modular symbols using eclib newforms

from cysignals.signals cimport sig_on, sig_off

from ..eclib cimport *
from sage.libs.eclib cimport *
from sage.libs.gmp.mpq cimport mpq_numref
from sage.libs.ntl.convert cimport mpz_to_ZZ
from sage.rings.rational_field import QQ
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/flint/arith.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ FLINT Arithmetic Functions

from cysignals.signals cimport sig_on, sig_off

from .fmpz cimport *
from .fmpq cimport *
from sage.libs.flint.fmpz cimport *
from sage.libs.flint.fmpq cimport *


from sage.rings.integer cimport Integer
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/flint/ntl_interface.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# distutils: libraries = flint
# distutils: depends = flint/NTL-interface.h

from .types cimport fmpz_t, fmpz_poly_t
from sage.libs.flint.types cimport fmpz_t, fmpz_poly_t

from sage.libs.ntl.ZZ cimport ZZ_c
from sage.libs.ntl.ZZX cimport ZZX_c
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gap/element.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .gap_includes cimport Obj, UInt
from sage.libs.gap.gap_includes cimport Obj, UInt
from sage.structure.sage_object cimport SageObject
from sage.structure.element cimport Element, ModuleElement, RingElement

Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/gap/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ elements. For general information about GAP, you should read the
from cpython.object cimport Py_EQ, Py_NE, Py_LE, Py_GE, Py_LT, Py_GT
from cysignals.signals cimport sig_on, sig_off

from .gap_includes cimport *
from sage.libs.gap.gap_includes cimport *
from .libgap import libgap
from .util cimport *
from sage.libs.gap.util cimport *
from .util import GAPError
from sage.cpython.string cimport str_to_bytes, char_to_str
from sage.rings.integer_ring import ZZ
Expand Down
6 changes: 3 additions & 3 deletions src/sage/libs/gap/libgap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ AUTHORS:

from pathlib import Path

from .gap_includes cimport *
from .util cimport *
from .element cimport *
from sage.libs.gap.gap_includes cimport *
from sage.libs.gap.util cimport *
from sage.libs.gap.element cimport *

from sage.cpython.string cimport str_to_bytes
from sage.structure.parent cimport Parent
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gap/util.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from .gap_includes cimport Obj
from sage.libs.gap.gap_includes cimport Obj

############################################################################
### Hooking into the GAP memory management #################################
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/gap/util.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import os
import warnings
import sage.env

from .gap_includes cimport *
from .element cimport *
from sage.libs.gap.gap_includes cimport *
from sage.libs.gap.element cimport *
from sage.cpython.string import FS_ENCODING
from sage.cpython.string cimport str_to_bytes, char_to_str
from sage.interfaces.gap_workspace import prepare_workspace_dir
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/glpk/error.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Error handler for the GLPK library

from cysignals.signals cimport sig_error

from .env cimport *
from sage.libs.glpk.env cimport *
from cpython.exc cimport PyErr_SetObject
from sage.cpython.string cimport char_to_str
from sage.numerical.mip import MIPSolverException
Expand Down
10 changes: 5 additions & 5 deletions src/sage/libs/gmp/all.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .types cimport *
from .random cimport *
from .mpz cimport *
from .mpq cimport *
from .pylong cimport *
from sage.libs.gmp.types cimport *
from sage.libs.gmp.random cimport *
from sage.libs.gmp.mpz cimport *
from sage.libs.gmp.mpq cimport *
from sage.libs.gmp.pylong cimport *
6 changes: 3 additions & 3 deletions src/sage/libs/gmp/binop.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ r"""
Fast binary operations for basic types
"""

from .types cimport mpz_t, mpq_t
from .mpz cimport mpz_set, mpz_add, mpz_mul
from .mpq cimport mpq_canonicalize, mpq_numref, mpq_denref, mpq_add
from sage.libs.gmp.types cimport mpz_t, mpq_t
from sage.libs.gmp.mpz cimport mpz_set, mpz_add, mpz_mul
from sage.libs.gmp.mpq cimport mpq_canonicalize, mpq_numref, mpq_denref, mpq_add

cdef inline void mpq_add_z(mpq_t res, mpq_t op1, mpz_t op2) noexcept:
mpz_mul(mpq_numref(res), mpq_denref(op1), op2)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/mpf.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: libraries = gmp

from .types cimport *
from sage.libs.gmp.types cimport *

cdef extern from "gmp.h":

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/mpn.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: libraries = gmp

from .types cimport *
from sage.libs.gmp.types cimport *

cdef extern from "gmp.h":

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/mpq.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: libraries = gmp

from .types cimport *
from sage.libs.gmp.types cimport *

cdef extern from "gmp.h":

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/mpz.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: libraries = gmp

from .types cimport *
from sage.libs.gmp.types cimport *
from libc.stdio cimport FILE

from libc.stdint cimport intmax_t, uintmax_t
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/pylong.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from cpython.long cimport PyLong_FromLong
from cpython.longintrepr cimport _PyLong_New, py_long, digit, PyLong_SHIFT
from sage.cpython.pycore_long cimport (ob_digit, _PyLong_IsNegative,
_PyLong_DigitCount, _PyLong_SetSignAndDigitCount)
from .mpz cimport *
from sage.libs.gmp.mpz cimport *

cdef extern from *:
"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gmp/random.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# distutils: libraries = gmp

from .types cimport *
from sage.libs.gmp.types cimport *

cdef extern from "gmp.h":

Expand Down
2 changes: 1 addition & 1 deletion src/sage/libs/gsl/airy.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# distutils: libraries = GSL_LIBRARIES
# distutils: library_dirs = GSL_LIBDIR
# distutils: include_dirs = GSL_INCDIR
from .types cimport *
from sage.libs.gsl.types cimport *

cdef extern from "gsl/gsl_sf_airy.h":

Expand Down
122 changes: 61 additions & 61 deletions src/sage/libs/gsl/all.pxd
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
from .types cimport *
from sage.libs.gsl.types cimport *

from .math cimport *
from .complex cimport *
from .poly cimport *
from .airy cimport *
from .bessel cimport *
from .clausen cimport *
from .coulomb cimport *
from .coupling cimport *
from .dawson cimport *
from .debye cimport *
from .dilog cimport *
from .elementary cimport *
from .ellint cimport *
from .elljac cimport *
from .erf cimport *
from .exp cimport *
from .expint cimport *
from .fermi_dirac cimport *
from .gamma cimport *
from .gegenbauer cimport *
from .hyperg cimport *
from .laguerre cimport *
from .lambert cimport *
from .legendre cimport *
from .log cimport *
from .pow_int cimport *
from .psi cimport *
from .synchrotron cimport *
from .transport cimport *
from .trig cimport *
from .wavelet cimport *
from .zeta cimport *
from sage.libs.gsl.math cimport *
from sage.libs.gsl.complex cimport *
from sage.libs.gsl.poly cimport *
from sage.libs.gsl.airy cimport *
from sage.libs.gsl.bessel cimport *
from sage.libs.gsl.clausen cimport *
from sage.libs.gsl.coulomb cimport *
from sage.libs.gsl.coupling cimport *
from sage.libs.gsl.dawson cimport *
from sage.libs.gsl.debye cimport *
from sage.libs.gsl.dilog cimport *
from sage.libs.gsl.elementary cimport *
from sage.libs.gsl.ellint cimport *
from sage.libs.gsl.elljac cimport *
from sage.libs.gsl.erf cimport *
from sage.libs.gsl.exp cimport *
from sage.libs.gsl.expint cimport *
from sage.libs.gsl.fermi_dirac cimport *
from sage.libs.gsl.gamma cimport *
from sage.libs.gsl.gegenbauer cimport *
from sage.libs.gsl.hyperg cimport *
from sage.libs.gsl.laguerre cimport *
from sage.libs.gsl.lambert cimport *
from sage.libs.gsl.legendre cimport *
from sage.libs.gsl.log cimport *
from sage.libs.gsl.pow_int cimport *
from sage.libs.gsl.psi cimport *
from sage.libs.gsl.synchrotron cimport *
from sage.libs.gsl.transport cimport *
from sage.libs.gsl.trig cimport *
from sage.libs.gsl.wavelet cimport *
from sage.libs.gsl.zeta cimport *

from .block cimport *
from .vector cimport *
from .vector_complex cimport *
from .matrix cimport *
from .matrix_complex cimport *
from sage.libs.gsl.block cimport *
from sage.libs.gsl.vector cimport *
from sage.libs.gsl.vector_complex cimport *
from sage.libs.gsl.matrix cimport *
from sage.libs.gsl.matrix_complex cimport *

from .permutation cimport *
from .combination cimport *
from .sort cimport *
from sage.libs.gsl.permutation cimport *
from sage.libs.gsl.combination cimport *
from sage.libs.gsl.sort cimport *

from .blas cimport *
from .linalg cimport *
from .eigen cimport *
from .fft cimport *
from .integration cimport *
from .rng cimport *
from .qrng cimport *
from .random cimport *
from .statistics cimport *
from .histogram cimport *
from .ntuple cimport *
from .monte cimport *
from .odeiv cimport *
from .interp cimport *
from .chebyshev cimport *
from .sum cimport *
from .roots cimport *
from .min cimport *
from .fit cimport *
from .errno cimport *
from sage.libs.gsl.blas cimport *
from sage.libs.gsl.linalg cimport *
from sage.libs.gsl.eigen cimport *
from sage.libs.gsl.fft cimport *
from sage.libs.gsl.integration cimport *
from sage.libs.gsl.rng cimport *
from sage.libs.gsl.qrng cimport *
from sage.libs.gsl.random cimport *
from sage.libs.gsl.statistics cimport *
from sage.libs.gsl.histogram cimport *
from sage.libs.gsl.ntuple cimport *
from sage.libs.gsl.monte cimport *
from sage.libs.gsl.odeiv cimport *
from sage.libs.gsl.interp cimport *
from sage.libs.gsl.chebyshev cimport *
from sage.libs.gsl.sum cimport *
from sage.libs.gsl.roots cimport *
from sage.libs.gsl.min cimport *
from sage.libs.gsl.fit cimport *
from sage.libs.gsl.errno cimport *
2 changes: 1 addition & 1 deletion src/sage/libs/gsl/bessel.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# distutils: libraries = GSL_LIBRARIES
# distutils: library_dirs = GSL_LIBDIR
# distutils: include_dirs = GSL_INCDIR
from .types cimport *
from sage.libs.gsl.types cimport *

cdef extern from "gsl/gsl_sf_bessel.h":

Expand Down
Loading

0 comments on commit 1a50a80

Please sign in to comment.