You could wrap your solution in a FiniteSet and attempt an Intersection:

>>> nonlinsolve([x**2 - 2*y**2 -2, x*y - 2], [x, y])
{(-2, -1), (2, 1), (-sqrt(2)*I, sqrt(2)*I), (sqrt(2)*I, -sqrt(2)*I)}
>>> _.intersect(S.Naturals**2)
{(2, 1)}


On Monday, May 27, 2019 at 5:14:02 AM UTC-5, Simone Perriello wrote:
>
> Well, the title says pretty much everything. Is it possible to restrict 
> the domain of nonlinsolve to solve, say, only for real numbers? 
> Restrictions on the domain of symbols doesn't seem to work for nonlinsolve, 
> while works well with the simple solve.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/bd58d3e7-c745-4565-95d1-8b75f7b95f21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to