Skip to content

Commit

Permalink
XXX remove some extension=True options
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Apr 23, 2017
1 parent 1b178c4 commit 692f368
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion diofant/concrete/gosper.py
Expand Up @@ -39,7 +39,7 @@ def gosper_normal(f, g, n, polys=True):
>>> gosper_normal(4*n + 5, 2*(4*n + 1)*(2*n + 3), n, polys=False)
(1/4, n + 3/2, n + 1/4)
"""
(p, q), opt = parallel_poly_from_expr((f, g), n, field=True, extension=True)
(p, q), opt = parallel_poly_from_expr((f, g), n, field=True)

a, A = p.LC(), p.monic()
b, B = q.LC(), q.monic()
Expand Down
2 changes: 1 addition & 1 deletion diofant/domains/tests/test_domains.py
Expand Up @@ -266,7 +266,7 @@ def test_Domain_unify_algebraic():
assert sqrt2.unify(rootof) == rootof.unify(sqrt2) == ans

# here domain created from tuple, not Expr
p = Poly(x**3 - sqrt(2)*x - 1, x, extension=True)
p = Poly(x**3 - sqrt(2)*x - 1, x)
sqrt2 = p.domain
assert sqrt2.unify(rootof) == rootof.unify(sqrt2) == ans

Expand Down
8 changes: 4 additions & 4 deletions diofant/polys/tests/test_constructor.py
Expand Up @@ -23,8 +23,8 @@ def test_construct_domain():
assert result[1] == [RR(3.14), RR(1.0), RR(0.5)]

assert construct_domain([3.14, sqrt(2)], extension=False) == (EX, [EX(3.14), EX(sqrt(2))])
assert construct_domain([3.14, sqrt(2)], extension=True) == (EX, [EX(3.14), EX(sqrt(2))])
assert construct_domain([sqrt(2), 3.14], extension=True) == (EX, [EX(sqrt(2)), EX(3.14)])
assert construct_domain([3.14, sqrt(2)]) == (EX, [EX(3.14), EX(sqrt(2))])
assert construct_domain([sqrt(2), 3.14]) == (EX, [EX(sqrt(2)), EX(3.14)])

assert construct_domain([1, sqrt(2)], extension=False) == (EX, [EX(1), EX(sqrt(2))])

Expand All @@ -33,12 +33,12 @@ def test_construct_domain():

alg = QQ.algebraic_field(sqrt(2))

assert construct_domain([7, Rational(1, 2), sqrt(2)], extension=True) == \
assert construct_domain([7, Rational(1, 2), sqrt(2)]) == \
(alg, [alg.convert(7), alg.convert(Rational(1, 2)), alg.convert(sqrt(2))])

alg = QQ.algebraic_field(sqrt(2) + sqrt(3))

assert construct_domain([7, sqrt(2), sqrt(3)], extension=True) == \
assert construct_domain([7, sqrt(2), sqrt(3)]) == \
(alg, [alg.convert(7), alg.convert(sqrt(2)), alg.convert(sqrt(3))])

dom = ZZ[x]
Expand Down
3 changes: 0 additions & 3 deletions diofant/polys/tests/test_polyutils.py
Expand Up @@ -264,9 +264,6 @@ def test__dict_from_expr_no_gens():
assert dict_from_expr(3*sqrt(
2)*pi*x*y, extension=True) == ({(1, 1, 1): 3*sqrt(2)}, (x, y, pi))

assert dict_from_expr(3*sqrt(
2)*pi*x*y, extension=True) == ({(1, 1, 1): 3*sqrt(2)}, (x, y, pi))

f = cos(x)*sin(x) + cos(x)*sin(y) + cos(y)*sin(x) + cos(y)*sin(y)

assert dict_from_expr(f) == ({(0, 1, 0, 1): 1, (0, 1, 1, 0): 1,
Expand Down
2 changes: 1 addition & 1 deletion diofant/solvers/solvers.py
Expand Up @@ -1181,7 +1181,7 @@ def _solve_system(exprs, symbols, **flags):
g = d - i
g = g.as_numer_denom()[0]

poly = g.as_poly(*symbols, extension=True)
poly = g.as_poly(*symbols)

if poly is not None:
polys.append(poly)
Expand Down

0 comments on commit 692f368

Please sign in to comment.