I was just trying out sympy to try and make a few bits of hand-algebra
easier, and avoid mistakes, but am having some trouble.

I'm trying to factor out one variable, so tried (having set up a and b
as symbols):

factor(a*b+b, b)

And get:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\Python25\Lib\site-packages\sympy\polynomials
\wrapper.py", line 38, in factor
    return Mul(*[ff.sympy_expr for ff in factor_.factor(f, var,
order)])
  File "C:\Program Files\Python25\Lib\site-packages\sympy\polynomials
\factor_.py", line 182, in factor
    denom, f = f.as_integer()
  File "C:\Program Files\Python25\Lib\site-packages\sympy\polynomials
\base.py", line 467, in as_integer
    raise PolynomialException("%s is no rational coefficient!" %
term[0])
PolynomialException: 1 + a is no rational coefficient!

Trying without the 2nd argument gives the result I expected, but I
want to specify the factor for a more complicated example where it
isn't clear.

Also, factor(a*b+b*c+a*c) seems to just hang on my computer.  Can't
decide what to factor by?

It seems like I'm only trying simple stuff and it doesn't work!  Have
I got the wrong idea here and am making some horrible
misunderstanding?

Thanks,
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to