Hello,

It is a bug. 

>What does the error  "'Complement' object is not iterable" means? Google 
not saying anything at all on this particular error messag

Solveset returns solution in Set. So if some values should not be included 
in solution set, then it uses Complement.

e.g. In second case ans is `{-b*sqrt(1/(b**2 + 1)), b*sqrt(1/(b**2 + 1))} \ 
{1, -1}`

Here solution set is  `{-b*sqrt(1/(b**2 + 1)), b*sqrt(1/(b**2 + 1))}` and 
`{1-1}` set is not the part of answer (since it makes denominator of  
*v/sympy.sqrt(-v**2 
+ 1)   *
equals to zero). Ans this overall solution type is 
 `sympy.sets.sets.Complement`.

Thanks for sharing it.

--
Shekhar

On Monday, 15 August 2016 17:13:20 UTC+5:30, Vassili Leonov wrote:
>
> I'm getting this error with 
> >>> sympy.release.__version__
> '1.0'
>
> >>> import sympy
> >>> v,b = sympy.symbols('v b')
> >>>* sympy.solveset(v/sympy.sqrt(-v**2 + 1) - b, v)*
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File 
> "/base/data/home/apps/s~sympy-live-hrd/46.393464279709602171/sympy/sympy/solvers/solveset.py",
>  
> line 791, in solveset
>     return _solveset(f, symbol, domain, _check=True)
>   File 
> "/base/data/home/apps/s~sympy-live-hrd/46.393464279709602171/sympy/sympy/solvers/solveset.py",
>  
> line 612, in _solveset
>     solver)
>   File 
> "/base/data/home/apps/s~sympy-live-hrd/46.393464279709602171/sympy/sympy/solvers/solveset.py",
>  
> line 507, in _solve_radical
>     return FiniteSet(*[s for s in result if checksol(f, symbol, s) is 
> True])
> TypeError: 'Complement' object is not iterable
>
> Same on my two different installations, same on http://live.sympy.org/
>
> *But it solves it fine after trivial transformation*:
>
> >>>* sympy.solveset(v**2/(-v**2 + 1) - b**2, v)*
> {-b*sqrt(1/(b**2 + 1)), b*sqrt(1/(b**2 + 1))} \ {-1, 1}
>
> *Is this the expected behaviour?*
> What does the error  "'Complement' object is not iterable" means? Google 
> not saying anything at all on this particular error message.
>
> Thank you for your time and consideration.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/76ee2ac5-a5e6-4bf3-b99e-c9eaa9696b64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to