(original) (raw)

commit 76df9a680ee9e120de7b98d2bafcbb80ee0ce62a Author: Ondrej Certik ondrej@certik.cz Date: Mon Nov 10 07:59:37 2008 +0100 import fixes. diff --git a/sympy/mpmath/__init__.py b/sympy/mpmath/__init__.py index d1d31d3..3bbc262 100644 --- a/sympy/mpmath/__init__.py +++ b/sympy/mpmath/__init__.py @@ -1,6 +1,6 @@ __version__ = '0.10' -from mptypes import (\ +from .mptypes import (\ mpnumeric, mpf, mpc, mpi, convert_lossless, make_mpf, make_mpc, make_mpi, mp, extraprec, extradps, workprec, workdps, @@ -9,7 +9,7 @@ from mptypes import (\ arange, linspace, rand, absmin, absmax ) -from functions import (\ +from .functions import (\ pi, degree, e, ln2, ln10, phi, euler, catalan, khinchin, glaisher, apery, sqrt, cbrt, exp, ln, log, log10, power, diff --git a/sympy/mpmath/calculus.py b/sympy/mpmath/calculus.py index 52a2f4c..d433161 100644 --- a/sympy/mpmath/calculus.py +++ b/sympy/mpmath/calculus.py @@ -11,10 +11,10 @@ etc __docformat__ = 'plaintext' -from settings import (mp, extraprec) -from mptypes import (mpnumeric, convert_lossless, mpf, mpc, j, inf, eps, +from .settings import (mp, extraprec) +from .mptypes import (mpnumeric, convert_lossless, mpf, mpc, j, inf, eps, AS_POINTS, arange, nstr) -from functions import (ldexp, factorial, exp, cos, pi, bernoulli) +from .functions import (ldexp, factorial, exp, cos, pi, bernoulli) from .quadrature import quadgl, quadts diff --git a/sympy/mpmath/elliptic.py b/sympy/mpmath/elliptic.py index 4f02066..a2cd0ca 100644 --- a/sympy/mpmath/elliptic.py +++ b/sympy/mpmath/elliptic.py @@ -16,8 +16,8 @@ """ import sys -from mptypes import (mpf, convert_lossless, eps) -from functions import (pi, sqrt, cos, sin, exp, ellipk, sech) +from .mptypes import (mpf, convert_lossless, eps) +from .functions import (pi, sqrt, cos, sin, exp, ellipk, sech) def calculate_nome(k): """ diff --git a/sympy/mpmath/functions.py b/sympy/mpmath/functions.py index 2d12e24..de9b0b1 100644 --- a/sympy/mpmath/functions.py +++ b/sympy/mpmath/functions.py @@ -22,7 +22,7 @@ from . import libmpi from . import gammazeta from . import libhyper -from mptypes import (\ +from .mptypes import (\ mpnumeric, convert_lossless, mpf, make_mpf, mpc, make_mpc, diff --git a/sympy/mpmath/gammazeta.py b/sympy/mpmath/gammazeta.py index 065a802..e16f527 100644 --- a/sympy/mpmath/gammazeta.py +++ b/sympy/mpmath/gammazeta.py @@ -15,13 +15,13 @@ This module implements gamma- and zeta-related functions: import math -from settings import (\ +from .settings import (\ MP_BASE, MP_ZERO, MP_ONE, MP_THREE, MODE, gmpy, round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast ) -from libmpf import (\ +from .libmpf import (\ lshift, sqrt_fixed, fzero, fone, fnone, fhalf, ftwo, finf, fninf, fnan, from_int, to_int, to_fixed, from_man_exp, from_rational, @@ -32,7 +32,7 @@ from libmpf import (\ negative_rnd, reciprocal_rnd, ) -from libelefun import (\ +from .libelefun import (\ constant_memo, def_mpf_constant, mpf_pi, pi_fixed, ln2_fixed, log_int_fixed, @@ -40,7 +40,7 @@ from libelefun import (\ cos_sin, cosh_sinh ) -from libmpc import (\ +from .libmpc import (\ mpc_zero, mpc_one, mpc_half, mpc_two, mpc_abs, mpc_add, mpc_sub, mpc_mul, mpc_div, diff --git a/sympy/mpmath/identification.py b/sympy/mpmath/identification.py index 73cfb10..17196fa 100644 --- a/sympy/mpmath/identification.py +++ b/sympy/mpmath/identification.py @@ -3,8 +3,8 @@ Implements the PSLQ algorithm for integer relation detection, and derivative algorithms for constant recognition. """ -from mptypes import (mpf, eps, mp) -from functions import (log, exp, sqrt) +from .mptypes import (mpf, eps, mp) +from .functions import (log, exp, sqrt) from .libmpf import to_fixed, from_man_exp, MODE from .libelefun import mpf_sqrt diff --git a/sympy/mpmath/libelefun.py b/sympy/mpmath/libelefun.py index 158c264..b1ce0d8 100644 --- a/sympy/mpmath/libelefun.py +++ b/sympy/mpmath/libelefun.py @@ -11,13 +11,13 @@ see libmpc and libmpi. import math -from settings import (\ +from .settings import (\ MP_BASE, MP_ZERO, MP_ONE, MP_FIVE, MODE, round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, ) -from libmpf import (\ +from .libmpf import (\ ComplexResult, bitcount, bctable, lshift, rshift, giant_steps, giant_steps2, sqrt_fixed, sqrt_fixed2, diff --git a/sympy/mpmath/libhyper.py b/sympy/mpmath/libhyper.py index 20ac1a4..7477996 100644 --- a/sympy/mpmath/libhyper.py +++ b/sympy/mpmath/libhyper.py @@ -8,22 +8,22 @@ cases are also provided. import operator import math -from settings import (\ +from .settings import (\ MP_ZERO, MP_ONE, round_fast, round_nearest ) -from libmpf import (\ +from .libmpf import (\ negative_rnd, bitcount, to_fixed, from_man_exp, to_int, fzero, fone, fnone, ftwo, finf, fninf, fnan, mpf_perturb, mpf_neg, mpf_shift, mpf_sub, mpf_mul, mpf_div, sqrt_fixed, mpf_sqrt, mpf_rdiv_int ) -from libelefun import (\ +from .libelefun import (\ mpf_pi, mpf_exp, pi_fixed ) -from libmpc import (\ +from .libmpc import (\ mpc_one, mpc_sub, mpc_mul_mpf, mpc_mul, mpc_neg, complex_int_pow ) diff --git a/sympy/mpmath/libmpc.py b/sympy/mpmath/libmpc.py index a7490e0..5e953b5 100644 --- a/sympy/mpmath/libmpc.py +++ b/sympy/mpmath/libmpc.py @@ -2,13 +2,13 @@ Low-level functions for complex arithmetic. """ -from settings import (\ +from .settings import (\ MP_BASE, MP_ZERO, MP_ONE, MP_TWO, round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast ) -from libmpf import (\ +from .libmpf import (\ bctable, normalize, reciprocal_rnd, rshift, lshift, giant_steps, to_str, to_fixed, from_man_exp, from_float, from_int, to_int, fzero, fone, ftwo, fhalf, finf, fninf, fnan, @@ -17,7 +17,7 @@ from libmpf import (\ mpf_rdiv_int, mpf_floor, mpf_ceil ) -from libelefun import (\ +from .libelefun import (\ mpf_pi, mpf_exp, mpf_log, cos_sin, cosh_sinh, mpf_tan, mpf_atan, mpf_atan2, mpf_cosh, mpf_sinh, mpf_tanh, mpf_asin, mpf_acos, mpf_acosh diff --git a/sympy/mpmath/libmpf.py b/sympy/mpmath/libmpf.py index bec5906..3fa6a12 100644 --- a/sympy/mpmath/libmpf.py +++ b/sympy/mpmath/libmpf.py @@ -9,7 +9,7 @@ import math from bisect import bisect from random import getrandbits -from settings import (\ +from .settings import (\ MP_BASE, MP_ZERO, MP_ONE, MP_TWO, MP_FIVE, MODE, STRICT, gmpy, round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, diff --git a/sympy/mpmath/libmpi.py b/sympy/mpmath/libmpi.py index 23982aa..b8139fc 100644 --- a/sympy/mpmath/libmpi.py +++ b/sympy/mpmath/libmpi.py @@ -3,11 +3,11 @@ Computational functions for interval arithmetic. """ -from settings import (\ +from .settings import (\ round_down, round_up, round_floor, round_ceiling, round_nearest, prec_to_dps) -from libmpf import (\ +from .libmpf import (\ ComplexResult, fnan, finf, fninf, fzero, fhalf, fone, fnone, mpf_sign, mpf_lt, mpf_le, mpf_gt, mpf_ge, mpf_eq, mpf_cmp, @@ -15,7 +15,7 @@ from libmpf import (\ mpf_abs, mpf_neg, mpf_pos, mpf_add, mpf_sub, mpf_mul, mpf_div, mpf_shift, mpf_pow_int) -from libelefun import (\ +from .libelefun import (\ mpf_log, mpf_exp, mpf_sqrt, reduce_angle, calc_cos_sin ) diff --git a/sympy/mpmath/matrices.py b/sympy/mpmath/matrices.py index dc1765a..5cd38cc 100644 --- a/sympy/mpmath/matrices.py +++ b/sympy/mpmath/matrices.py @@ -2,7 +2,7 @@ -from mptypes import (convert_lossless, absmax, mpf, mpc, rand, inf) +from .mptypes import (convert_lossless, absmax, mpf, mpc, rand, inf) from .functions import nthroot, sqrt rowsep = '\n' diff --git a/sympy/mpmath/mptypes.py b/sympy/mpmath/mptypes.py index c56e18a..624a21d 100644 --- a/sympy/mpmath/mptypes.py +++ b/sympy/mpmath/mptypes.py @@ -4,10 +4,10 @@ operating with them. """ __docformat__ = 'plaintext' -from settings import (MP_BASE, MP_ONE, mp, prec_rounding, extraprec, extradps, +from .settings import (MP_BASE, MP_ONE, mp, prec_rounding, extraprec, extradps, workprec, workdps, int_types, repr_dps, round_floor, round_ceiling) -from libmpf import (\ +from .libmpf import (\ ComplexResult, to_pickable, from_pickable, normalize, from_int, from_float, from_str, to_int, to_float, to_str, from_rational, from_man_exp, @@ -18,7 +18,7 @@ from libmpf import (\ mpf_hash, mpf_rand ) -from libmpc import (\ +from .libmpc import (\ complex_to_str, mpc_abs, mpc_add, mpc_add_mpf, mpc_sub, mpc_sub_mpf, mpc_mul, mpc_mul_mpf, mpc_mul_int, mpc_div, mpc_div_mpf, mpc_pow, mpc_pow_mpf, mpc_pow_int @@ -26,7 +26,7 @@ from libmpc import (\ from .libelefun import mpf_pow -from libmpi import (\ +from .libmpi import (\ mpi_mid, mpi_delta, mpi_str, mpi_abs, mpi_pos, mpi_neg, mpi_add, mpi_sub, mpi_mul, mpi_div, mpi_pow_int, mpi_pow diff --git a/sympy/mpmath/quadrature.py b/sympy/mpmath/quadrature.py index a600b82..aa3aadb 100644 --- a/sympy/mpmath/quadrature.py +++ b/sympy/mpmath/quadrature.py @@ -1,4 +1,4 @@ -from mptypes import (mp, mpf, convert_lossless, inf, +from .mptypes import (mp, mpf, convert_lossless, inf, eps, nstr, make_mpf, AS_POINTS) from .functions import pi, exp, log, ldexp /ondrej@certik.cz