2014-12-05 15:41:06 +00:00
|
|
|
--- ./examples/advanced/autowrap_ufuncify.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./examples/advanced/autowrap_ufuncify.py 2014-12-04 10:30:58.017350207 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -25,7 +25,7 @@ np = import_module('numpy')
|
|
|
|
if not np:
|
|
|
|
sys.exit("Cannot import numpy. Exiting.")
|
|
|
|
|
|
|
|
-import sympy.mpmath as mpmath
|
|
|
|
+import mpmath
|
|
|
|
from sympy.utilities.autowrap import ufuncify
|
|
|
|
from sympy.utilities.lambdify import implemented_function
|
|
|
|
from sympy import symbols, legendre, Plot, pprint
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./examples/advanced/pidigits.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./examples/advanced/pidigits.py 2014-12-04 10:30:58.017350207 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -6,8 +6,8 @@ Example shows arbitrary precision using
|
|
|
|
computation of the digits of pi.
|
|
|
|
"""
|
|
|
|
|
|
|
|
-from sympy.mpmath import libmp, pi
|
|
|
|
-from sympy.mpmath import functions as mpf_funs
|
|
|
|
+from mpmath import libmp, pi
|
|
|
|
+from mpmath import functions as mpf_funs
|
|
|
|
|
|
|
|
import math
|
|
|
|
from time import clock
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./setup.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./setup.py 2014-12-04 10:30:58.017350207 -0700
|
|
|
|
@@ -73,11 +73,6 @@ modules = [
|
2013-12-09 21:37:03 +00:00
|
|
|
'sympy.matrices',
|
2014-12-05 15:41:06 +00:00
|
|
|
'sympy.matrices.benchmarks',
|
2013-12-09 21:37:03 +00:00
|
|
|
'sympy.matrices.expressions',
|
|
|
|
- 'sympy.mpmath',
|
|
|
|
- 'sympy.mpmath.calculus',
|
|
|
|
- 'sympy.mpmath.functions',
|
|
|
|
- 'sympy.mpmath.libmp',
|
|
|
|
- 'sympy.mpmath.matrices',
|
|
|
|
'sympy.ntheory',
|
|
|
|
'sympy.parsing',
|
|
|
|
'sympy.physics',
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -246,7 +241,6 @@ tests = [
|
2013-12-09 21:37:03 +00:00
|
|
|
'sympy.logic.tests',
|
|
|
|
'sympy.matrices.expressions.tests',
|
|
|
|
'sympy.matrices.tests',
|
|
|
|
- 'sympy.mpmath.tests',
|
|
|
|
'sympy.ntheory.tests',
|
|
|
|
'sympy.parsing.tests',
|
|
|
|
'sympy.physics.hep.tests',
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/combinatorics/permutations.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/combinatorics/permutations.py 2014-12-04 10:30:58.018350206 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -9,7 +9,7 @@ from sympy.utilities.iterables import (f
|
|
|
|
has_dups, runs)
|
|
|
|
from sympy.polys.polytools import lcm
|
|
|
|
from sympy.matrices import zeros
|
|
|
|
-from sympy.mpmath.libmp.libintmath import ifac
|
|
|
|
+from mpmath.libmp.libintmath import ifac
|
|
|
|
|
|
|
|
|
|
|
|
def _af_rmul(a, b):
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/evalf.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/evalf.py 2014-12-04 14:05:59.235169407 -0700
|
|
|
|
@@ -6,20 +6,20 @@ from __future__ import print_function, d
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
import math
|
|
|
|
|
|
|
|
-import sympy.mpmath.libmp as libmp
|
2014-12-05 15:41:06 +00:00
|
|
|
-from sympy.mpmath import (
|
|
|
|
+import mpmath.libmp as libmp
|
|
|
|
+from mpmath import (
|
|
|
|
make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc, workprec)
|
2013-12-09 21:37:03 +00:00
|
|
|
-from sympy.mpmath import inf as mpmath_inf
|
|
|
|
-from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf,
|
|
|
|
+from mpmath import inf as mpmath_inf
|
|
|
|
+from mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf,
|
|
|
|
fnan, fnone, fone, fzero, mpf_abs, mpf_add,
|
|
|
|
mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt,
|
|
|
|
mpf_mul, mpf_neg, mpf_pi, mpf_pow, mpf_pow_int, mpf_shift, mpf_sin,
|
|
|
|
mpf_sqrt, normalize, round_nearest, to_int, to_str)
|
|
|
|
-from sympy.mpmath.libmp import bitcount as mpmath_bitcount
|
|
|
|
-from sympy.mpmath.libmp.backend import MPZ
|
|
|
|
-from sympy.mpmath.libmp.libmpc import _infs_nan
|
|
|
|
-from sympy.mpmath.libmp.libmpf import dps_to_prec
|
|
|
|
-from sympy.mpmath.libmp.gammazeta import mpf_bernoulli
|
|
|
|
+from mpmath.libmp import bitcount as mpmath_bitcount
|
|
|
|
+from mpmath.libmp.backend import MPZ
|
|
|
|
+from mpmath.libmp.libmpc import _infs_nan
|
|
|
|
+from mpmath.libmp.libmpf import dps_to_prec
|
|
|
|
+from mpmath.libmp.gammazeta import mpf_bernoulli
|
|
|
|
|
|
|
|
from .compatibility import SYMPY_INTS
|
|
|
|
from .sympify import sympify
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/expr.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/expr.py 2014-12-04 11:07:54.359742059 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -8,7 +8,7 @@ from .evalf import EvalfMixin, pure_comp
|
|
|
|
from .decorators import _sympifyit, call_highest_priority
|
|
|
|
from .cache import cacheit
|
|
|
|
from .compatibility import reduce, as_int, default_sort_key, xrange
|
|
|
|
-from sympy.mpmath.libmp import mpf_log, prec_to_dps
|
|
|
|
+from mpmath.libmp import mpf_log, prec_to_dps
|
|
|
|
|
|
|
|
from collections import defaultdict
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -384,7 +384,7 @@ class Expr(Basic, EvalfMixin):
|
|
|
|
# increase the precision up to the default maximum
|
|
|
|
# precision to see if we can get any significance
|
|
|
|
|
|
|
|
- from sympy.mpmath.libmp.libintmath import giant_steps
|
|
|
|
+ from mpmath.libmp.libintmath import giant_steps
|
|
|
|
from sympy.core.evalf import DEFAULT_MAXPREC as target
|
|
|
|
|
|
|
|
# evaluate
|
|
|
|
--- ./sympy/core/function.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/function.py 2014-12-04 10:30:58.020350202 -0700
|
|
|
|
@@ -51,8 +51,8 @@ from sympy.utilities import default_sort
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.utilities.iterables import uniq
|
2014-12-05 15:41:06 +00:00
|
|
|
from sympy.core.evaluate import global_evaluate
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
-from sympy import mpmath
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
+import mpmath
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
|
2014-03-14 23:03:02 +00:00
|
|
|
import inspect
|
2013-12-09 21:37:03 +00:00
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -460,7 +460,7 @@ class Function(Application, Expr):
|
2013-12-09 21:37:03 +00:00
|
|
|
try:
|
|
|
|
args = [arg._to_mpmath(prec + 5) for arg in self.args]
|
|
|
|
def bad(m):
|
|
|
|
- from sympy.mpmath import mpf, mpc
|
|
|
|
+ from mpmath import mpf, mpc
|
|
|
|
# the precision of an mpf value is the last element
|
|
|
|
# if that is 1 (and m[1] is not 1 which would indicate a
|
|
|
|
# power of 2), then the eval failed; so check that none of
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -1223,7 +1223,7 @@ class Derivative(Expr):
|
2013-12-09 21:37:03 +00:00
|
|
|
When we can represent derivatives at a point, this should be folded
|
|
|
|
into the normal evalf. For now, we need a special method.
|
|
|
|
"""
|
|
|
|
- from sympy import mpmath
|
|
|
|
+ import mpmath
|
|
|
|
from sympy.core.expr import Expr
|
|
|
|
if len(self.free_symbols) != 1 or len(self.variables) != 1:
|
|
|
|
raise NotImplementedError('partials and higher order derivatives')
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/numbers.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/numbers.py 2014-12-04 10:30:58.021350201 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -16,11 +16,11 @@ from .cache import cacheit, clear_cache
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.core.compatibility import (
|
|
|
|
as_int, integer_types, long, string_types, with_metaclass, HAS_GMPY,
|
|
|
|
SYMPY_INTS)
|
|
|
|
-import sympy.mpmath as mpmath
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
-from sympy.mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed
|
|
|
|
-from sympy.mpmath.ctx_mp import mpnumeric
|
|
|
|
-from sympy.mpmath.libmp.libmpf import (
|
|
|
|
+import mpmath
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
+from mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed
|
|
|
|
+from mpmath.ctx_mp import mpnumeric
|
|
|
|
+from mpmath.libmp.libmpf import (
|
|
|
|
finf as _mpf_inf, fninf as _mpf_ninf,
|
|
|
|
fnan as _mpf_nan, fzero as _mpf_zero, _normalize as mpf_normalize,
|
|
|
|
prec_to_dps)
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/power.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/power.py 2014-12-04 10:30:58.021350201 -0700
|
|
|
|
@@ -14,7 +14,7 @@ from .logic import fuzzy_bool
|
|
|
|
from .compatibility import as_int, xrange
|
|
|
|
from .evaluate import global_evaluate
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
-from sympy.mpmath.libmp import sqrtrem as mpmath_sqrtrem
|
|
|
|
+from mpmath.libmp import sqrtrem as mpmath_sqrtrem
|
|
|
|
from sympy.utilities.iterables import sift
|
|
|
|
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/tests/test_evalf.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/tests/test_evalf.py 2014-12-04 10:31:03.063341891 -0700
|
|
|
|
@@ -4,9 +4,9 @@ from sympy import (Add, ceiling, cos, E,
|
|
|
|
Sum, Product, Integral)
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.core.evalf import complex_accuracy, PrecisionExhausted, scaled_zero
|
|
|
|
from sympy.core.compatibility import long
|
|
|
|
-from sympy.mpmath import inf, ninf, nan
|
|
|
|
+from mpmath import inf, ninf, nan
|
|
|
|
from sympy.abc import n, x, y
|
|
|
|
-from sympy.mpmath.libmp.libmpf import from_float
|
|
|
|
+from mpmath.libmp.libmpf import from_float
|
|
|
|
from sympy.utilities.pytest import raises, XFAIL
|
|
|
|
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/tests/test_numbers.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/tests/test_numbers.py 2014-12-04 10:56:49.005878896 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -6,9 +6,9 @@ from sympy.core.basic import _aresame
|
|
|
|
from sympy.core.compatibility import long, u
|
|
|
|
from sympy.core.power import integer_nthroot
|
|
|
|
from sympy.core.numbers import igcd, ilcm, igcdex, seterr, _intcache, mpf_norm
|
|
|
|
-from sympy.mpmath import mpf
|
|
|
|
+from mpmath import mpf
|
|
|
|
from sympy.utilities.pytest import XFAIL, slow, raises
|
|
|
|
-from sympy import mpmath
|
|
|
|
+import mpmath
|
|
|
|
|
|
|
|
|
|
|
|
def test_integers_cache():
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -1355,8 +1355,8 @@ def test_issue_4172():
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
@XFAIL
|
|
|
|
def test_mpmath_issues():
|
|
|
|
- from sympy.mpmath.libmp.libmpf import _normalize
|
|
|
|
- import sympy.mpmath.libmp as mlib
|
|
|
|
+ from mpmath.libmp.libmpf import _normalize
|
|
|
|
+ import mpmath.libmp as mlib
|
|
|
|
rnd = mlib.round_nearest
|
|
|
|
mpf = (0, long(0), -123, -1, 53, rnd) # nan
|
|
|
|
assert _normalize(mpf, 53) != (0, long(0), 0, 0)
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -1365,7 +1365,7 @@ def test_mpmath_issues():
|
2013-12-09 21:37:03 +00:00
|
|
|
mpf = (1, long(0), -789, -3, 53, rnd) # -inf
|
|
|
|
assert _normalize(mpf, 53) != (0, long(0), 0, 0)
|
|
|
|
|
|
|
|
- from sympy.mpmath.libmp.libmpf import fnan
|
|
|
|
+ from mpmath.libmp.libmpf import fnan
|
|
|
|
assert mlib.mpf_eq(fnan, fnan)
|
|
|
|
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -1396,7 +1396,7 @@ def test_int_NumberSymbols():
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
def test_issue_6640():
|
2013-12-09 21:37:03 +00:00
|
|
|
- from sympy.mpmath.libmp.libmpf import (
|
|
|
|
+ from mpmath.libmp.libmpf import (
|
|
|
|
_normalize as mpf_normalize, finf, fninf, fzero)
|
|
|
|
# fnan is not included because Float no longer returns fnan,
|
|
|
|
# but otherwise, the same sort of test could apply
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/core/tests/test_sympify.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/tests/test_sympify.py 2014-12-04 10:31:04.375339729 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -11,7 +11,7 @@ from sympy.functions.combinatorial.facto
|
|
|
|
from sympy.abc import _clash, _clash1, _clash2
|
|
|
|
from sympy.core.compatibility import exec_, HAS_GMPY
|
|
|
|
|
|
|
|
-from sympy import mpmath
|
|
|
|
+import mpmath
|
|
|
|
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
def test_issue_3538():
|
|
|
|
--- ./sympy/core/tests/test_wester.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/core/tests/test_wester.py 2014-12-04 10:31:04.377339726 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -6,6 +6,7 @@ See also http://math.unm.edu/~wester/cas
|
|
|
|
each tested system.
|
|
|
|
"""
|
|
|
|
|
|
|
|
+import mpmath
|
|
|
|
from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, zoo,
|
|
|
|
product, binomial, rf, pi, gamma, igcd, factorint, radsimp, combsimp,
|
|
|
|
npartitions, totient, primerange, factor, simplify, gcd, resultant, expand,
|
|
|
|
@@ -13,7 +14,7 @@ from sympy import (Rational, symbols, fa
|
|
|
|
bernoulli, hyper, hyperexpand, besselj, asin, assoc_legendre, Function, re,
|
|
|
|
im, DiracDelta, chebyshevt, legendre_poly, polylog, series, O,
|
|
|
|
atan, sinh, cosh, tanh, floor, ceiling, solve, asinh, acot, csc, sec,
|
|
|
|
- LambertW, N, apart, sqrtdenest, factorial2, powdenest, Mul, S, mpmath, ZZ,
|
|
|
|
+ LambertW, N, apart, sqrtdenest, factorial2, powdenest, Mul, S, ZZ,
|
|
|
|
Poly, expand_func, E, Q, And, Or, Ne, Eq, Le, Lt,
|
2014-12-05 15:41:06 +00:00
|
|
|
ask, refine, AlgebraicNumber, continued_fraction_iterator as cf_i,
|
|
|
|
continued_fraction_periodic as cf_p, continued_fraction_convergents as cf_c,
|
|
|
|
@@ -26,7 +27,7 @@ from sympy.functions.special.zeta_functi
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.integrals.deltafunctions import deltaintegrate
|
2014-12-05 15:41:06 +00:00
|
|
|
from sympy.utilities.pytest import XFAIL, slow, SKIP, skip, ON_TRAVIS
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.utilities.iterables import partitions
|
|
|
|
-from sympy.mpmath import mpi, mpc
|
|
|
|
+from mpmath import mpi, mpc
|
|
|
|
from sympy.matrices import Matrix, GramSchmidt, eye
|
|
|
|
from sympy.matrices.expressions.blockmatrix import BlockMatrix, block_collapse
|
|
|
|
from sympy.matrices.expressions import MatrixSymbol, ZeroMatrix
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/external/tests/test_numpy.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/external/tests/test_numpy.py 2014-12-04 10:31:04.378339724 -0700
|
|
|
|
@@ -21,7 +21,7 @@ from sympy import (Rational, Symbol, lis
|
|
|
|
Matrix, lambdify, symarray, symbols, Integer)
|
2013-12-09 21:37:03 +00:00
|
|
|
import sympy
|
|
|
|
|
|
|
|
-from sympy import mpmath
|
|
|
|
+import mpmath
|
|
|
|
from sympy.abc import x, y, z
|
|
|
|
from sympy.utilities.decorator import conserve_mpmath_dps
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/functions/combinatorial/numbers.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/combinatorial/numbers.py 2014-12-04 10:59:59.605872355 -0700
|
|
|
|
@@ -21,8 +21,8 @@ from sympy.functions.elementary.exponent
|
|
|
|
from sympy.functions.elementary.trigonometric import sin, cos, cot
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.functions.combinatorial.factorials import factorial
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
-from sympy.mpmath import bernfrac, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
-from sympy.mpmath.libmp import ifib as _ifib
|
2014-12-05 15:41:06 +00:00
|
|
|
+from mpmath import bernfrac, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
+from mpmath.libmp import ifib as _ifib
|
|
|
|
|
|
|
|
|
|
|
|
def _product(a, b):
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -706,7 +706,7 @@ class euler(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
if m.is_odd:
|
|
|
|
return S.Zero
|
|
|
|
if m.is_Integer and m.is_nonnegative:
|
|
|
|
- from sympy.mpmath import mp
|
|
|
|
+ from mpmath import mp
|
|
|
|
m = m._to_mpmath(mp.prec)
|
|
|
|
res = mp.eulernum(m, exact=True)
|
|
|
|
return Integer(res)
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -725,7 +725,7 @@ class euler(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
m = self.args[0]
|
|
|
|
|
|
|
|
if m.is_Integer and m.is_nonnegative:
|
|
|
|
- from sympy.mpmath import mp
|
|
|
|
+ from mpmath import mp
|
|
|
|
from sympy import Expr
|
|
|
|
m = m._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
with workprec(prec):
|
|
|
|
--- ./sympy/functions/special/bessel.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/special/bessel.py 2014-12-04 11:01:02.478869466 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -706,8 +706,8 @@ def jn_zeros(n, k, method="sympy", dps=1
|
2013-12-09 21:37:03 +00:00
|
|
|
from math import pi
|
|
|
|
|
|
|
|
if method == "sympy":
|
|
|
|
- from sympy.mpmath import besseljzero
|
|
|
|
- from sympy.mpmath.libmp.libmpf import dps_to_prec
|
|
|
|
+ from mpmath import besseljzero
|
|
|
|
+ from mpmath.libmp.libmpf import dps_to_prec
|
|
|
|
from sympy import Expr
|
|
|
|
prec = dps_to_prec(dps)
|
|
|
|
return [Expr._from_mpmath(besseljzero(S(n + 0.5)._to_mpmath(prec),
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -1209,7 +1209,7 @@ class airyaiprime(AiryBase):
|
|
|
|
raise ArgumentIndexError(self, argindex)
|
|
|
|
|
|
|
|
def _eval_evalf(self, prec):
|
2014-12-05 15:41:06 +00:00
|
|
|
- from sympy.mpmath import mp, workprec
|
|
|
|
+ from mpmath import mp, workprec
|
2014-03-14 23:03:02 +00:00
|
|
|
from sympy import Expr
|
|
|
|
z = self.args[0]._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
with workprec(prec):
|
|
|
|
@@ -1365,7 +1365,7 @@ class airybiprime(AiryBase):
|
2014-03-14 23:03:02 +00:00
|
|
|
raise ArgumentIndexError(self, argindex)
|
|
|
|
|
|
|
|
def _eval_evalf(self, prec):
|
2014-12-05 15:41:06 +00:00
|
|
|
- from sympy.mpmath import mp, workprec
|
|
|
|
+ from mpmath import mp, workprec
|
2014-03-14 23:03:02 +00:00
|
|
|
from sympy import Expr
|
|
|
|
z = self.args[0]._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
with workprec(prec):
|
|
|
|
--- ./sympy/functions/special/error_functions.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/special/error_functions.py 2014-12-04 10:31:04.380339721 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -1339,7 +1339,7 @@ class li(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
We can even compute Soldner's constant by the help of mpmath:
|
|
|
|
|
|
|
|
- >>> from sympy.mpmath import findroot
|
|
|
|
+ >>> from mpmath import findroot
|
|
|
|
>>> findroot(li, 2)
|
|
|
|
1.45136923488338
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/functions/special/gamma_functions.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/special/gamma_functions.py 2014-12-04 14:05:59.241169397 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -296,7 +296,7 @@ class lowergamma(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
return (cls(a + 1, x) + x**a * C.exp(-x))/a
|
|
|
|
|
|
|
|
def _eval_evalf(self, prec):
|
2014-12-05 15:41:06 +00:00
|
|
|
- from sympy.mpmath import mp, workprec
|
|
|
|
+ from mpmath import mp, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy import Expr
|
|
|
|
a = self.args[0]._to_mpmath(prec)
|
|
|
|
z = self.args[1]._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -395,7 +395,7 @@ class uppergamma(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
raise ArgumentIndexError(self, argindex)
|
|
|
|
|
|
|
|
def _eval_evalf(self, prec):
|
2014-12-05 15:41:06 +00:00
|
|
|
- from sympy.mpmath import mp, workprec
|
|
|
|
+ from mpmath import mp, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy import Expr
|
|
|
|
a = self.args[0]._to_mpmath(prec)
|
|
|
|
z = self.args[1]._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/functions/special/hyper.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/special/hyper.py 2014-12-04 10:31:04.381339719 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -600,7 +600,8 @@ class meijerg(TupleParametersBase):
|
2013-12-09 21:37:03 +00:00
|
|
|
# (carefully so as not to loose the branch information), and evaluate
|
|
|
|
# G(z'**(1/r)) = G(z'**n) = G(z).
|
|
|
|
from sympy.functions import exp_polar, ceiling
|
|
|
|
- from sympy import mpmath, Expr
|
|
|
|
+ from sympy import Expr
|
|
|
|
+ import mpmath
|
|
|
|
z = self.argument
|
|
|
|
znum = self.argument._eval_evalf(prec)
|
|
|
|
if znum.has(exp_polar):
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/functions/special/spherical_harmonics.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/functions/special/spherical_harmonics.py 2014-12-04 14:05:59.242169395 -0700
|
|
|
|
@@ -219,7 +219,7 @@ class Ynm(Function):
|
2013-12-09 21:37:03 +00:00
|
|
|
# Note: works without this function by just calling
|
|
|
|
# mpmath for Legendre polynomials. But using
|
|
|
|
# the dedicated function directly is cleaner.
|
2014-12-05 15:41:06 +00:00
|
|
|
- from sympy.mpmath import mp, workprec
|
|
|
|
+ from mpmath import mp, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy import Expr
|
|
|
|
n = self.args[0]._to_mpmath(prec)
|
|
|
|
m = self.args[1]._to_mpmath(prec)
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/geometry/ellipse.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/geometry/ellipse.py 2014-12-04 10:31:04.383339716 -0700
|
2014-03-14 23:03:02 +00:00
|
|
|
@@ -24,7 +24,7 @@ from .entity import GeometryEntity
|
|
|
|
from .point import Point
|
|
|
|
from .line import LinearEntity, Line
|
|
|
|
from .util import _symbol, idiff
|
|
|
|
-from sympy.mpmath import findroot as nroot
|
|
|
|
+from mpmath import findroot as nroot
|
|
|
|
|
|
|
|
|
|
|
|
import random
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/liealgebras/weyl_group.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/liealgebras/weyl_group.py 2014-12-04 10:31:04.383339716 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -3,7 +3,7 @@
|
|
|
|
from sympy.core import Basic, Rational
|
|
|
|
from sympy.core.numbers import igcd
|
|
|
|
from .cartan_type import CartanType
|
|
|
|
-from sympy.mpmath import fac
|
|
|
|
+from mpmath import fac
|
|
|
|
from operator import itemgetter
|
|
|
|
from itertools import groupby
|
|
|
|
from sympy.matrices import Matrix, eye
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/matrices/matrices.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/matrices/matrices.py 2014-12-04 10:31:04.384339714 -0700
|
|
|
|
@@ -1238,7 +1238,7 @@ class MatrixBase(object):
|
2013-12-09 21:37:03 +00:00
|
|
|
"""Solve the linear system Ax = rhs for x where A = self.
|
|
|
|
|
|
|
|
This is for symbolic matrices, for real or complex ones use
|
|
|
|
- sympy.mpmath.lu_solve or sympy.mpmath.qr_solve.
|
|
|
|
+ mpmath.lu_solve or mpmath.qr_solve.
|
|
|
|
|
|
|
|
See Also
|
|
|
|
========
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -1615,7 +1615,7 @@ class MatrixBase(object):
|
2013-12-09 21:37:03 +00:00
|
|
|
to use QRsolve.
|
|
|
|
|
|
|
|
This is mainly for educational purposes and symbolic matrices, for real
|
|
|
|
- (or complex) matrices use sympy.mpmath.qr_solve.
|
|
|
|
+ (or complex) matrices use mpmath.qr_solve.
|
|
|
|
|
|
|
|
See Also
|
|
|
|
========
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/ntheory/partitions_.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/ntheory/partitions_.py 2014-12-04 10:31:04.384339714 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
from __future__ import print_function, division
|
|
|
|
|
|
|
|
-from sympy.mpmath.libmp import (fzero,
|
|
|
|
+from mpmath.libmp import (fzero,
|
|
|
|
from_man_exp, from_int, from_rational,
|
|
|
|
fone, fhalf, bitcount, to_int, to_str, mpf_mul, mpf_div, mpf_sub,
|
|
|
|
mpf_add, mpf_sqrt, mpf_pi, mpf_cosh_sinh, pi_fixed, mpf_cos)
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/physics/quantum/constants.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/physics/quantum/constants.py 2014-12-04 10:31:04.384339714 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -6,7 +6,7 @@ from sympy.core.numbers import NumberSym
|
|
|
|
from sympy.core.singleton import Singleton
|
|
|
|
from sympy.core.compatibility import u, with_metaclass
|
|
|
|
from sympy.printing.pretty.stringpict import prettyForm
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Constants
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/physics/quantum/qubit.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/physics/quantum/qubit.py 2014-12-04 10:31:04.385339712 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -24,7 +24,7 @@ from sympy.physics.quantum.represent imp
|
|
|
|
from sympy.physics.quantum.matrixutils import (
|
|
|
|
numpy_ndarray, scipy_sparse_matrix
|
|
|
|
)
|
|
|
|
-from sympy.mpmath.libmp.libintmath import bitcount
|
|
|
|
+from mpmath.libmp.libintmath import bitcount
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
'Qubit',
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/domains/groundtypes.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/domains/groundtypes.py 2014-12-04 10:31:04.385339712 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -69,7 +69,7 @@ else:
|
|
|
|
gmpy_qdiv = None
|
|
|
|
|
|
|
|
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
|
|
|
|
|
|
|
|
def python_sqrt(n):
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/domains/mpelements.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/domains/mpelements.py 2014-12-04 10:31:04.385339712 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -4,11 +4,11 @@ from __future__ import print_function, d
|
|
|
|
|
|
|
|
from sympy.polys.domains.domainelement import DomainElement
|
|
|
|
|
|
|
|
-from sympy.mpmath.ctx_mp_python import PythonMPContext, _mpf, _mpc, _constant
|
|
|
|
-from sympy.mpmath.libmp import (MPZ_ONE, fzero, fone, finf, fninf, fnan,
|
|
|
|
+from mpmath.ctx_mp_python import PythonMPContext, _mpf, _mpc, _constant
|
|
|
|
+from mpmath.libmp import (MPZ_ONE, fzero, fone, finf, fninf, fnan,
|
|
|
|
round_nearest, mpf_mul, mpf_abs, mpf_lt, mpc_abs, repr_dps, int_types,
|
|
|
|
from_int, from_float, from_str, to_rational)
|
|
|
|
-from sympy.mpmath.rational import mpq
|
|
|
|
+from mpmath.rational import mpq
|
|
|
|
|
|
|
|
from sympy.utilities import public
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/modulargcd.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/modulargcd.py 2014-12-04 10:31:04.386339711 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -7,7 +7,7 @@ from sympy.polys.polyerrors import Modul
|
|
|
|
from sympy.polys.domains import PolynomialRing
|
|
|
|
|
|
|
|
from sympy.core.compatibility import xrange
|
|
|
|
-from sympy.mpmath import sqrt
|
|
|
|
+from mpmath import sqrt
|
|
|
|
from sympy import Dummy
|
|
|
|
import random
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/numberfields.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/numberfields.py 2014-12-04 10:31:04.386339711 -0700
|
|
|
|
@@ -47,7 +47,7 @@ from sympy.core.exprtools import Factors
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.simplify.simplify import _mexpand, _is_sum_surds
|
|
|
|
from sympy.ntheory import sieve
|
|
|
|
from sympy.ntheory.factor_ import divisors
|
|
|
|
-from sympy.mpmath import pslq, mp
|
|
|
|
+from mpmath import pslq, mp
|
|
|
|
|
|
|
|
from sympy.core.compatibility import reduce
|
|
|
|
from sympy.core.compatibility import xrange
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/polytools.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/polytools.py 2014-12-04 11:04:04.672827949 -0700
|
|
|
|
@@ -47,8 +47,8 @@ from sympy.polys.polyerrors import (
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.utilities import group, sift, public
|
|
|
|
|
|
|
|
import sympy.polys
|
|
|
|
-import sympy.mpmath
|
2014-12-05 15:41:06 +00:00
|
|
|
-from sympy.mpmath.libmp.libhyper import NoConvergence
|
2013-12-09 21:37:03 +00:00
|
|
|
+import mpmath
|
2014-12-05 15:41:06 +00:00
|
|
|
+from mpmath.libmp.libhyper import NoConvergence
|
2013-12-09 21:37:03 +00:00
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
from sympy.polys.domains import FF, QQ, ZZ
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.polys.constructor import construct_domain
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -3391,18 +3391,18 @@ class Poly(Expr):
|
|
|
|
coeffs = [coeff.evalf(n=n).as_real_imag()
|
|
|
|
for coeff in f.all_coeffs()]
|
|
|
|
try:
|
|
|
|
- coeffs = [sympy.mpmath.mpc(*coeff) for coeff in coeffs]
|
|
|
|
+ coeffs = [mpmath.mpc(*coeff) for coeff in coeffs]
|
|
|
|
except TypeError:
|
|
|
|
raise DomainError("Numerical domain expected, got %s" % \
|
|
|
|
f.rep.dom)
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
- dps = sympy.mpmath.mp.dps
|
|
|
|
- sympy.mpmath.mp.dps = n
|
|
|
|
+ dps = mpmath.mp.dps
|
|
|
|
+ mpmath.mp.dps = n
|
|
|
|
|
|
|
|
try:
|
2014-12-05 15:41:06 +00:00
|
|
|
# We need to add extra precision to guard against losing accuracy.
|
|
|
|
# 10 times the degree of the polynomial seems to work well.
|
|
|
|
- roots = sympy.mpmath.polyroots(coeffs, maxsteps=maxsteps,
|
|
|
|
+ roots = mpmath.polyroots(coeffs, maxsteps=maxsteps,
|
|
|
|
cleanup=cleanup, error=False, extraprec=f.degree()*10)
|
|
|
|
|
|
|
|
# Mpmath puts real roots first, then complex ones (as does all_roots)
|
|
|
|
@@ -3414,7 +3414,7 @@ class Poly(Expr):
|
|
|
|
'convergence to root failed; try n < %s or maxsteps > %s' % (
|
|
|
|
n, maxsteps))
|
2013-12-09 21:37:03 +00:00
|
|
|
finally:
|
|
|
|
- sympy.mpmath.mp.dps = dps
|
|
|
|
+ mpmath.mp.dps = dps
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
return roots
|
|
|
|
|
|
|
|
--- ./sympy/polys/ring_series.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/ring_series.py 2014-12-04 11:09:16.774704452 -0700
|
|
|
|
@@ -3,10 +3,10 @@
|
|
|
|
from sympy.polys.domains import QQ
|
|
|
|
from sympy.polys.rings import ring, PolyElement
|
|
|
|
from sympy.polys.monomials import monomial_min, monomial_mul
|
|
|
|
-from sympy.mpmath.libmp.libintmath import ifac
|
|
|
|
+from mpmath.libmp.libintmath import ifac
|
|
|
|
from sympy.core.numbers import Rational
|
|
|
|
from sympy.core.compatibility import as_int
|
|
|
|
-from sympy.mpmath.libmp.libintmath import giant_steps
|
|
|
|
+from mpmath.libmp.libintmath import giant_steps
|
|
|
|
import math
|
|
|
|
|
|
|
|
def _invert_monoms(p1):
|
|
|
|
--- ./sympy/polys/rootoftools.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/rootoftools.py 2014-12-04 14:05:59.247169386 -0700
|
|
|
|
@@ -28,8 +28,8 @@ from sympy.polys.polyerrors import (
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
from sympy.polys.domains import QQ
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
-from sympy.mpmath import mp, mpf, mpc, findroot, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
-from sympy.mpmath.libmp.libmpf import prec_to_dps
|
2014-12-05 15:41:06 +00:00
|
|
|
+from mpmath import mp, mpf, mpc, findroot, workprec
|
2013-12-09 21:37:03 +00:00
|
|
|
+from mpmath.libmp.libmpf import prec_to_dps
|
|
|
|
|
|
|
|
from sympy.utilities import lambdify, public
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/polys/tests/test_polyroots.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/polys/tests/test_polyroots.py 2014-12-04 14:06:31.622109815 -0700
|
|
|
|
@@ -17,6 +17,7 @@ from sympy.utilities.iterables import ca
|
|
|
|
from sympy.utilities.pytest import raises, XFAIL
|
|
|
|
from sympy.utilities.randtest import verify_numerically
|
|
|
|
import sympy
|
|
|
|
+import mpmath
|
|
|
|
|
|
|
|
|
|
|
|
a, b, c, d, e, q, t, x, y, z = symbols('a,b,c,d,e,q,t,x,y,z')
|
|
|
|
@@ -584,7 +585,7 @@ def test_nroots1():
|
|
|
|
n = 64
|
|
|
|
p = legendre_poly(n, x, polys=True)
|
|
|
|
|
|
|
|
- raises(sympy.mpmath.mp.NoConvergence, lambda: p.nroots(n=3, maxsteps=5))
|
|
|
|
+ raises(mpmath.mp.NoConvergence, lambda: p.nroots(n=3, maxsteps=5))
|
|
|
|
|
|
|
|
roots = p.nroots(n=3)
|
|
|
|
# The order of roots matters. They are ordered from smallest to the
|
|
|
|
--- ./sympy/printing/latex.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/printing/latex.py 2014-12-04 10:31:04.391339702 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -15,8 +15,8 @@ from .printer import Printer
|
|
|
|
from .conventions import split_super_sub, requires_partial
|
|
|
|
from .precedence import precedence, PRECEDENCE
|
|
|
|
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
-from sympy.mpmath.libmp import prec_to_dps
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
+from mpmath.libmp import prec_to_dps
|
|
|
|
|
|
|
|
from sympy.core.compatibility import default_sort_key, xrange
|
|
|
|
from sympy.utilities.iterables import has_variety
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/printing/repr.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/printing/repr.py 2014-12-04 10:31:04.392339701 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -9,8 +9,8 @@ from __future__ import print_function, d
|
|
|
|
|
|
|
|
from sympy.core.function import AppliedUndef
|
|
|
|
from .printer import Printer
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
-from sympy.mpmath.libmp import prec_to_dps, repr_dps
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
+from mpmath.libmp import prec_to_dps, repr_dps
|
|
|
|
|
|
|
|
|
|
|
|
class ReprPrinter(Printer):
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/printing/str.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/printing/str.py 2014-12-04 10:31:04.392339701 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -10,8 +10,8 @@ from sympy.core.numbers import Integer
|
|
|
|
from .printer import Printer
|
|
|
|
from sympy.printing.precedence import precedence, PRECEDENCE
|
|
|
|
|
|
|
|
-import sympy.mpmath.libmp as mlib
|
|
|
|
-from sympy.mpmath.libmp import prec_to_dps
|
|
|
|
+import mpmath.libmp as mlib
|
|
|
|
+from mpmath.libmp import prec_to_dps
|
|
|
|
|
|
|
|
from sympy.utilities import default_sort_key
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/sets/sets.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/sets/sets.py 2014-12-04 11:10:31.446662910 -0700
|
|
|
|
@@ -13,7 +13,7 @@ from sympy.core.decorators import deprec
|
|
|
|
from sympy.core.mul import Mul
|
|
|
|
from sympy.sets.contains import Contains
|
|
|
|
|
|
|
|
-from sympy.mpmath import mpi, mpf
|
|
|
|
+from mpmath import mpi, mpf
|
|
|
|
from sympy.logic.boolalg import And, Or, Not, true, false
|
|
|
|
from sympy.utilities import default_sort_key, subsets
|
|
|
|
|
|
|
|
--- ./sympy/sets/tests/test_sets.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/sets/tests/test_sets.py 2014-12-04 11:10:10.615676162 -0700
|
|
|
|
@@ -2,7 +2,7 @@ from sympy import (Symbol, Set, Union, I
|
|
|
|
GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float,
|
|
|
|
FiniteSet, Intersection, imageset, I, true, false, ProductSet, E,
|
|
|
|
sqrt, Complement, EmptySet, sin, cos, Lambda, ImageSet, pi)
|
|
|
|
-from sympy.mpmath import mpi
|
|
|
|
+from mpmath import mpi
|
|
|
|
|
|
|
|
from sympy.utilities.pytest import raises
|
|
|
|
from sympy.utilities.pytest import raises, XFAIL
|
|
|
|
--- ./sympy/simplify/simplify.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/simplify/simplify.py 2014-12-04 10:31:04.393339699 -0700
|
|
|
|
@@ -34,7 +34,7 @@ from sympy.ntheory.factor_ import multip
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.polys import (Poly, together, reduced, cancel, factor,
|
|
|
|
ComputationFailed, lcm, gcd)
|
|
|
|
|
|
|
|
-import sympy.mpmath as mpmath
|
|
|
|
+import mpmath
|
|
|
|
|
|
|
|
|
|
|
|
def _mexpand(expr):
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/solvers/solvers.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/solvers/solvers.py 2014-12-04 10:31:04.394339698 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -47,7 +47,7 @@ from sympy.utilities.lambdify import lam
|
|
|
|
from sympy.utilities.misc import filldedent
|
2014-03-14 23:03:02 +00:00
|
|
|
from sympy.utilities.iterables import uniq, generate_bell, flatten
|
2013-12-09 21:37:03 +00:00
|
|
|
|
|
|
|
-from sympy.mpmath import findroot
|
|
|
|
+from mpmath import findroot
|
|
|
|
|
|
|
|
from sympy.solvers.polysys import solve_poly_system
|
|
|
|
from sympy.solvers.inequalities import reduce_inequalities
|
2014-12-05 15:41:06 +00:00
|
|
|
@@ -2417,8 +2417,8 @@ def nsolve(*args, **kwargs):
|
2013-12-09 21:37:03 +00:00
|
|
|
Overdetermined systems are supported.
|
|
|
|
|
|
|
|
>>> from sympy import Symbol, nsolve
|
|
|
|
- >>> import sympy
|
|
|
|
- >>> sympy.mpmath.mp.dps = 15
|
|
|
|
+ >>> import mpmath, sympy
|
|
|
|
+ >>> mpmath.mp.dps = 15
|
|
|
|
>>> x1 = Symbol('x1')
|
|
|
|
>>> x2 = Symbol('x2')
|
|
|
|
>>> f1 = 3 * x1**2 - 2 * x2**2 - 1
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/solvers/tests/test_numeric.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/solvers/tests/test_numeric.py 2014-12-04 10:31:04.395339696 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
from sympy import Eq, Matrix, pi, sin, sqrt, Symbol, Integral, Piecewise, symbols
|
|
|
|
-from sympy.mpmath import mnorm, mpf
|
|
|
|
+from mpmath import mnorm, mpf
|
|
|
|
from sympy.solvers import nsolve
|
|
|
|
from sympy.utilities.lambdify import lambdify
|
|
|
|
from sympy.utilities.pytest import raises, XFAIL
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/utilities/decorator.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/utilities/decorator.py 2014-12-04 10:31:06.039336987 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -81,7 +81,7 @@ def conserve_mpmath_dps(func):
|
|
|
|
"""After the function finishes, resets the value of mpmath.mp.dps to
|
|
|
|
the value it had before the function was run."""
|
|
|
|
import functools
|
|
|
|
- from sympy import mpmath
|
|
|
|
+ import mpmath
|
|
|
|
|
|
|
|
def func_wrapper():
|
|
|
|
dps = mpmath.mp.dps
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/utilities/lambdify.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/utilities/lambdify.py 2014-12-04 10:31:06.040336985 -0700
|
|
|
|
@@ -93,7 +93,7 @@ NUMEXPR_TRANSLATIONS = {}
|
2013-12-09 21:37:03 +00:00
|
|
|
# Available modules:
|
|
|
|
MODULES = {
|
|
|
|
"math": (MATH, MATH_DEFAULT, MATH_TRANSLATIONS, ("from math import *",)),
|
|
|
|
- "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from sympy.mpmath import *",)),
|
|
|
|
+ "mpmath": (MPMATH, MPMATH_DEFAULT, MPMATH_TRANSLATIONS, ("from mpmath import *",)),
|
|
|
|
"numpy": (NUMPY, NUMPY_DEFAULT, NUMPY_TRANSLATIONS, ("import_module('numpy')",)),
|
|
|
|
"sympy": (SYMPY, SYMPY_DEFAULT, {}, (
|
|
|
|
"from sympy.functions import *",
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/utilities/runtests.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/utilities/runtests.py 2014-12-04 11:05:35.646805355 -0700
|
|
|
|
@@ -473,7 +473,7 @@ def _test(*paths, **kwargs):
|
|
|
|
split = kwargs.get('split', None)
|
|
|
|
blacklist = kwargs.get('blacklist', [])
|
|
|
|
blacklist.extend([
|
|
|
|
- "sympy/mpmath", # needs to be fixed upstream
|
|
|
|
+ "mpmath", # needs to be fixed upstream
|
|
|
|
])
|
|
|
|
blacklist = convert_to_native_paths(blacklist)
|
|
|
|
r = PyTestReporter(verbose=verbose, tb=tb, colors=colors,
|
|
|
|
@@ -607,7 +607,7 @@ def _doctest(*paths, **kwargs):
|
2013-12-09 21:37:03 +00:00
|
|
|
split = kwargs.get('split', None)
|
|
|
|
blacklist.extend([
|
|
|
|
"doc/src/modules/mpmath", # needs to be fixed upstream
|
|
|
|
- "sympy/mpmath", # needs to be fixed upstream
|
|
|
|
+ "mpmath", # needs to be fixed upstream
|
|
|
|
"doc/src/modules/plotting.rst", # generates live plots
|
2014-12-05 15:41:06 +00:00
|
|
|
"sympy/utilities/compilef.py", # needs tcc
|
|
|
|
"sympy/physics/gaussopt.py", # raises deprecation warning
|
|
|
|
--- ./sympy/utilities/tests/diagnose_imports.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/utilities/tests/diagnose_imports.py 2014-12-04 10:31:06.041336983 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -117,7 +117,7 @@ if __name__ == "__main__":
|
|
|
|
"""Is module relevant for import checking?
|
|
|
|
|
|
|
|
Only imports between relevant modules will be checked."""
|
|
|
|
- return in_module(module, 'sympy') and not in_module(module, 'sympy.mpmath')
|
|
|
|
+ return in_module(module, 'sympy') and not in_module(module, 'mpmath')
|
|
|
|
|
|
|
|
sorted_messages = []
|
|
|
|
|
2014-12-05 15:41:06 +00:00
|
|
|
--- ./sympy/utilities/tests/test_lambdify.py.orig 2014-11-20 13:00:41.000000000 -0700
|
|
|
|
+++ ./sympy/utilities/tests/test_lambdify.py 2014-12-04 10:31:06.041336983 -0700
|
2013-12-09 21:37:03 +00:00
|
|
|
@@ -3,7 +3,7 @@ from sympy import (
|
2014-12-05 15:41:06 +00:00
|
|
|
symbols, lambdify, sqrt, sin, cos, tan, pi, atan, acos, acosh, Rational,
|
|
|
|
Float, Matrix, Lambda, exp, Integral, oo, I, Abs, Function, true, false)
|
2013-12-09 21:37:03 +00:00
|
|
|
from sympy.printing.lambdarepr import LambdaPrinter
|
|
|
|
-from sympy import mpmath
|
|
|
|
+import mpmath
|
|
|
|
from sympy.utilities.lambdify import implemented_function
|
|
|
|
from sympy.utilities.pytest import skip
|
|
|
|
from sympy.utilities.decorator import conserve_mpmath_dps
|