--- examples/fem.py | 6 +++--- examples/fem_test.py | 3 ++- examples/pidigits.py | 6 +++--- examples/print_gtk.py | 2 +- examples/print_pretty.py | 2 +- examples/trees.py | 2 +- sympy/core/tests/test_evalf.py | 8 ++++---- sympy/functions/combinatorial/numbers.py | 4 +--- sympy/galgebra/GAcalc.py | 2 +- sympy/galgebra/GAsympy.py | 2 +- sympy/galgebra/latex_out.py | 2 +- sympy/physics/tests/test_units.py | 3 ++- sympy/polynomials/base.py | 5 ++--- sympy/polynomials/div_.py | 4 ++-- sympy/polynomials/factor_.py | 5 +++-- sympy/polynomials/groebner_.py | 4 +++- sympy/polynomials/roots_.py | 5 +++-- sympy/polynomials/wrapper.py | 3 ++- sympy/polys/tests/test_polynomial.py | 15 ++++++++++----- sympy/statistics/distributions.py | 3 +-- sympy/utilities/tests/test_code_quality.py | 23 ----------------------- 21 files changed, 47 insertions(+), 62 deletions(-)
diff --git a/examples/fem.py b/examples/fem.py index 3e138e8..aad5d32 100644 --- a/examples/fem.py +++ b/examples/fem.py @@ -1,7 +1,7 @@ -from sympy import * +from sympy import symbols, Symbol, factorial, Rational, zeros, div, eye, \ + integrate - -x,y,z = symbols('xyz') +x, y, z = symbols('x y z') class ReferenceSimplex: def __init__(self, nsd): diff --git a/examples/fem_test.py b/examples/fem_test.py index 18274ab..ba68f66 100755 --- a/examples/fem_test.py +++ b/examples/fem_test.py @@ -13,7 +13,8 @@ $ python examples/fem_test.py [-1/360, -1/90, -1/360, 0, 0, 1/60] """ -from fem import * +from sympy import Symbol, zeros, diff, pprint +from fem import ReferenceSimplex, Lagrange t = ReferenceSimplex(2) fe = Lagrange(2,2) diff --git a/examples/pidigits.py b/examples/pidigits.py index 37a0b23..5c6b793 100755 --- a/examples/pidigits.py +++ b/examples/pidigits.py @@ -1,9 +1,9 @@ #!/usr/bin/env python import iam_sympy_example -from sympy.numerics import * -from sympy.numerics.utils_ import * -from sympy.numerics.constants import pi_float +#from sympy.numerics import * +#from sympy.numerics.utils_ import * +#from sympy.numerics.constants import pi_float import math from time import clock diff --git a/examples/print_gtk.py b/examples/print_gtk.py index 62d2d24..b75b1f6 100755 --- a/examples/print_gtk.py +++ b/examples/print_gtk.py @@ -3,7 +3,7 @@ import iam_sympy_example """examples for print_gtk. It prints in gtkmathview using mathml""" -from sympy import * +from sympy import Symbol, integrate, exp from sympy.printing import print_gtk x = Symbol('x') diff --git a/examples/print_pretty.py b/examples/print_pretty.py index 1678a4b..bbf6646 100755 --- a/examples/print_pretty.py +++ b/examples/print_pretty.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import iam_sympy_example -from sympy import * +from sympy import Symbol, pprint, sin, cos, exp, sqrt x=Symbol("x") y=Symbol("y") diff --git a/examples/trees.py b/examples/trees.py index 7e82208..a965731 100755 --- a/examples/trees.py +++ b/examples/trees.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import iam_sympy_example -from sympy import * +from sympy import Symbol, Poly def T(x): return x+x**2+2*x**3 + 4*x**4 + 9*x**5 + 20*x**6 + 48 * x**7 + \ diff --git a/sympy/core/tests/test_evalf.py b/sympy/core/tests/test_evalf.py index b315154..ff6bfd9 100644 --- a/sympy/core/tests/test_evalf.py +++ b/sympy/core/tests/test_evalf.py @@ -1,8 +1,8 @@ -from sympy.core.evalf import * +from sympy.core.evalf import PrecisionExhausted, complex_accuracy, from_float -from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, fibonacci, \ - Integral, oo, E, atan, log, integrate, floor, ceiling, factorial, binomial, \ - Sum, zeta, Catalan, Pow, GoldenRatio +from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \ + fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \ + factorial, binomial, Sum, zeta, Catalan, Pow, GoldenRatio, sympify from sympy.utilities.pytest import raises diff --git a/sympy/functions/combinatorial/numbers.py b/sympy/functions/combinatorial/numbers.py index a33c909..90f3739 100644 --- a/sympy/functions/combinatorial/numbers.py +++ b/sympy/functions/combinatorial/numbers.py @@ -7,9 +7,7 @@ Factorials, binomial coefficients and related functions are located in the separate 'factorials' module. """ -from sympy.core import * -from sympy.core.function import Function -from sympy.core.basic import S +from sympy import Function, S, Symbol, Rational, oo, Integer, C from sympy.mpmath import bernfrac diff --git a/sympy/galgebra/GAcalc.py b/sympy/galgebra/GAcalc.py index e45cd7d..8603cbc 100755 --- a/sympy/galgebra/GAcalc.py +++ b/sympy/galgebra/GAcalc.py @@ -3,7 +3,7 @@ import os.path -from GAsympy import * +#from GAsympy import * SYSMOD = sys.modules[__name__] diff --git a/sympy/galgebra/GAsympy.py b/sympy/galgebra/GAsympy.py index b7ff8f6..2bae90a 100644 --- a/sympy/galgebra/GAsympy.py +++ b/sympy/galgebra/GAsympy.py @@ -22,7 +22,7 @@ The relevant references for this module are: import numpy import os,sys,string,types,re,copy import sympy -from latex_out import * +#from latex_out import * NUMPAT = re.compile( '([\-0-9])|([\-0-9]/[0-9])') """Re pattern for rational number""" diff --git a/sympy/galgebra/latex_out.py b/sympy/galgebra/latex_out.py index 0c2ea40..3c1200c 100755 --- a/sympy/galgebra/latex_out.py +++ b/sympy/galgebra/latex_out.py @@ -4,7 +4,7 @@ Convert GAsympy output to LaTeX format """ -from string import * +#from string import * import re vars = re.compile(r'([A-Za-z]+)([0-9]+)') diff --git a/sympy/physics/tests/test_units.py b/sympy/physics/tests/test_units.py index fd00dc5..93382d1 100644 --- a/sympy/physics/tests/test_units.py +++ b/sympy/physics/tests/test_units.py @@ -1,5 +1,6 @@ from sympy import Rational -from sympy.physics.units import * +from sympy.physics.units import m, s, day, km, foot, meter, au, \ + speed_of_light, minute def test_units(): assert (5*m/s * day) / km == 432 diff --git a/sympy/polynomials/base.py b/sympy/polynomials/base.py index f7ede29..3236198 100644 --- a/sympy/polynomials/base.py +++ b/sympy/polynomials/base.py @@ -1,14 +1,13 @@ """Module providing the class Polynomial and low-level functions""" -from sympy.core import * +from sympy import Basic, Symbol, Pow, Number, Add, Mul, Integer, Rational, \ + sympify, symbols # Use (faster) Singleton comparisons. from sympy.core.basic import S # Need numbers.gcd, for content. from sympy.core.numbers import igcd # To determine coefficient type: from sympy.core.numbers import NumberSymbol, ImaginaryUnit -from sympy.utilities import * -from sympy.core import sympify from sympy.polynomials import fast import sympy.polynomials # for sympy.polynomials.wrapper (cyclic) diff --git a/sympy/polynomials/div_.py b/sympy/polynomials/div_.py index 92e6710..307189f 100644 --- a/sympy/polynomials/div_.py +++ b/sympy/polynomials/div_.py @@ -1,7 +1,7 @@ """Polynomial division algorithms for use with class Polynomial""" -from sympy.polynomials.base import * -from sympy.core import sympify +from sympy.polynomials.base import Polynomial, term_div, merge_var +from sympy.core import sympify, S, Symbol, Integer, symbols from sympy.core.numbers import igcd diff --git a/sympy/polynomials/factor_.py b/sympy/polynomials/factor_.py index d0a557c..7853a51 100644 --- a/sympy/polynomials/factor_.py +++ b/sympy/polynomials/factor_.py @@ -1,8 +1,9 @@ """Various algorithms for the factorization of polynomials.""" -from sympy import ntheory +from sympy import ntheory, S, Symbol, symbols, Integer, sympify -from sympy.polynomials.base import * +from sympy.polynomials.base import Polynomial, Polynomial2IntPoly, \ + IntPoly2Polynomial from sympy.polynomials import div_, fast def sqf(f, var=None, order=None, coeff=None): diff --git a/sympy/polynomials/groebner_.py b/sympy/polynomials/groebner_.py index a6d51f5..8ca70e8 100644 --- a/sympy/polynomials/groebner_.py +++ b/sympy/polynomials/groebner_.py @@ -1,6 +1,8 @@ """Algorithms for the computation of Groebner bases""" -from sympy.polynomials.base import * +from sympy import Basic, S, Symbol, symbols +from sympy.polynomials.base import Polynomial, term_lcm, term_mult, \ + term_div, term_is_mult, term_cmp, merge_var from sympy.polynomials import div_ def groebner(f, var=None, order=None, reduced=True): diff --git a/sympy/polynomials/roots_.py b/sympy/polynomials/roots_.py index 202f930..8e2aaa4 100644 --- a/sympy/polynomials/roots_.py +++ b/sympy/polynomials/roots_.py @@ -1,9 +1,10 @@ """Algorithms to determine the roots of polynomials""" -from sympy.polynomials.base import * +from sympy.polynomials.base import Polynomial, coeff_ring, get_numbers, \ + merge_var from sympy.polynomials import div_, groebner_ from sympy.functions.elementary.miscellaneous import sqrt -from sympy.core import sympify +from sympy.core import sympify, Symbol, S, Rational, C, symbols from sympy.core.numbers import igcd diff --git a/sympy/polynomials/wrapper.py b/sympy/polynomials/wrapper.py index c036271..580c603 100644 --- a/sympy/polynomials/wrapper.py +++ b/sympy/polynomials/wrapper.py @@ -1,6 +1,7 @@ """Module providing a user-friendly interface to the polynomial algorithms.""" -from sympy.polynomials.base import * +from sympy import S, Add, Symbol, Mul +from sympy.polynomials.base import coeff_ring, get_numbers, Polynomial from sympy.polynomials import div_ from sympy.polynomials import factor_ from sympy.polynomials import groebner_ diff --git a/sympy/polys/tests/test_polynomial.py b/sympy/polys/tests/test_polynomial.py index abc936b..d30bdbf 100644 --- a/sympy/polys/tests/test_polynomial.py +++ b/sympy/polys/tests/test_polynomial.py @@ -1,10 +1,15 @@ from sympy import symbols, expand, sin, sqrt, re, im, I, Rational, Lambda, \ - powsimp, raises - -from sympy.polys.monomial import * -from sympy.polys.polynomial import * -from sympy.polys.algorithms import * -from sympy.polys.rootfinding import * + powsimp, raises, Integer, Symbol, Poly, RootsOf, RootSum, RootOf, S + +from sympy.polys.monomial import monomial_lex_cmp, monomial_grlex_cmp, \ + monomial_grevlex_cmp, monomial_1_el_cmp +from sympy.polys.algorithms import poly_groebner, poly_subresultants, \ + poly_resultant, poly_half_gcdex, poly_gcdex, poly_gcd, poly_lcm, \ + poly_pdiv +from sympy.polys.rootfinding import poly_factors, roots_linear, \ + roots_quadratic, roots_cubic, roots_binomial, roots_rational, roots, \ + number_of_real_roots, poly_sturm, PolynomialError, poly_decompose, \ + poly_sqf, poly_div, CoefficientError, SymbolsError a,b,c,d,x,y,z,u,v,t = symbols('abcdxyzuvt') diff --git a/sympy/statistics/distributions.py b/sympy/statistics/distributions.py index d250963..a54ae03 100644 --- a/sympy/statistics/distributions.py +++ b/sympy/statistics/distributions.py @@ -1,5 +1,4 @@ -from sympy.core import * -from sympy.core import sympify +from sympy.core import sympify, Lambda, Symbol, Integer, Rational, oo, Real from sympy.functions import sqrt, exp, erf from sympy.printing import _StrPrinter as StrPrinter import random diff --git a/sympy/utilities/tests/test_code_quality.py b/sympy/utilities/tests/test_code_quality.py index 1c7a413..66accf7 100644 --- a/sympy/utilities/tests/test_code_quality.py +++ b/sympy/utilities/tests/test_code_quality.py @@ -80,29 +80,6 @@ def test_implicit_imports(): # these two should be fixed: "%(sep)smpmath%(sep)s" % sepd, "%(sep)splotting%(sep)s" % sepd, - - # everything below should be fixed soon: - "sympy/core/tests/test_evalf.py" % sepd, - "sympy/functions/combinatorial/numbers.py" % sepd, - "sympy/physics/tests/test_units.py" % sepd, - "sympy/polynomials/factor_.py" % sepd, - "sympy/polynomials/groebner_.py" % sepd, - "sympy/polynomials/wrapper.py" % sepd, - "sympy/polynomials/base.py" % sepd, - "sympy/polynomials/div_.py" % sepd, - "sympy/polynomials/roots_.py" % sepd, - "sympy/polys/tests/test_polynomial.py" % sepd, - "sympy/solvers/tests/test_solvers.py" % sepd, - "sympy/statistics/distributions.py" % sepd, - "sympy/examples/fem_test.py" % sepd, - "sympy/examples/pidigits.py" % sepd, - "sympy/examples/print_gtk.py" % sepd, - "sympy/examples/print_pretty.py" % sepd, - "sympy/examples/fem.py" % sepd, - "sympy/examples/trees.py" % sepd, - "sympy/galgebra/GAcalc.py" % sepd, - "sympy/galgebra/GAsympy.py" % sepd, - "sympy/galgebra/latex_out.py" % sepd, ]) for p in paths: assert exists(p) -- 1.5.6.5 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---