Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 2410 by [email protected]: Setting range for variables
http://code.google.com/p/sympy/issues/detail?id=2410
Hi,
I am new to sympy, but really enjoying using it. One difficulty I am
facing is related to setting ranges of variables in solver.
e.g. for this code
x = Symbol('x', negative=True, positive=False)
solve(x**2 -9, x)
[3, -3]
I thought I should get only -3, but I am getting both the answers. I also
tried "typical range", "assumptions" but nothing seems to work. I am using
Python 2.7.1.
Also how do I handle inequality. I tried the following code from a sympy
presentation, but got the following error. Any help/ suggestions/ pointers?
a = Symbol('a', real=True)
solve (a**2 - 2 > 0, a)
Traceback (most recent call last):
File "<pyshell#53>", line 1, in <module>
solve (a**2 - 2 > 0, a)
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 334,
in solve
raise ValueError('Could not parse expression %s' % f)
ValueError: Could not parse expression 0 < -2 + a**2
Thanks
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.