#16591: make sympy Diophantine functions work with symbolic expressions
-------------------------+-------------------------------------------------
   Reporter:  rws        |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.3
  Component:  symbolics  |         Keywords:  interface, solve, equation,
  Merged in:             |  integer
  Reviewers:             |          Authors:
Work issues:             |  Report Upstream:  N/A
     Commit:             |           Branch:
   Stopgaps:             |     Dependencies:
-------------------------+-------------------------------------------------
 This should work, shouldn't it?
 {{{
 sage: from sympy.solvers.diophantine import diop_solve
 sage: var('x,y,m')
 (x, y, m)
 sage: diop_solve(2*x + 3*y - 5, m)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-10-bda9278b9cd0> in <module>()
 ----> 1 diop_solve(Integer(2)*x + Integer(3)*y - Integer(5), m)

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/solvers/diophantine.py in diop_solve(eq, param)
     158     diophantine()
     159     """
 --> 160     var, coeff, eq_type = classify_diop(eq)
     161
     162     if eq_type == "linear":

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/solvers/diophantine.py in classify_diop(eq)
     220     ([x, y], {1: 5, x: 1, x**2: 1, y: 0, y**2: 1, x*y: -1},
 'binary_quadratic')
     221     """
 --> 222     eq = eq.expand(force=True)
     223     var = list(eq.free_symbols)
     224     var.sort(key=default_sort_key)

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sage/symbolic/expression.so in
 sage.symbolic.expression.Expression.expand
 (build/cythonized/sage/symbolic/expression.cpp:19411)()

 TypeError: expand() got an unexpected keyword argument 'force'
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16591>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to