On Apr 23, 2010, at 12:11 PM, Bastian Weber wrote:

> Hi,
> 
> smichr wrote:
>> One more thing. If you are working with noncommutatives, it would be
>> great to have you testing 1766. There is awareness there that isn't in
>> master yet:
>> 
>>>>> c, d=symbols('cd', commutative=0)
>>>>> (d**3).coeff(d**2)
>> 0
>>>>> (d**3).coeff(d**2, exact=0)
>> d
>>>>> a=d**2*c*d
>>>>> a.extract_multiplicatively(d**3)
>>>>> a.extract_multiplicatively(d**2)
>> c*d
> 
> Thanks for the hints. The iterative list comprehension and
> extract_multiplicatively are the things that I was looking for. Great.
> 
>>>>> a.extract_multiplicatively(d)
>> d**2*c
>>>>> a.coeff(c)
>>>>> 
>> 
>> That last one results because you can't pull out everything and have
>> only c on the right. 
> 
> on my machine (with the your 1766 branch) I get
> 
> 
> In [29]: c, d = symbols('c d', commutative = False)
> 
> In [30]: a = d**2 * c *d
> 
> In [31]: a.coeff(c)
> Out[31]: d**2
> 
> You get None if I understand correctly. Can that be true? (And I
> unfortunately dont understand your explanation.)
> 
> 
>> It's not been tested other than by the few
>> doctests that I have, so you are likely to run into something...but
>> you are already running into problems and might get further in 1766
>> and help get it into shape at the same time.
> 
> 
> Actually my question resulted from just a short trip to the
> non-commutative world (an exercise from a course on functional
> analysis). I dont know if I need more non-commutative calculations.
> 
> 
> 
> Regards,
> 
> Bastian.
> 
> PS (OT): Is there a proper way to have several sympy branches installed
>  in PYTHONPATH?
> 
Just do everything from within the sympy git directory.  If you are going to be 
working from the git repository, you really don't even need to bother 
installing SymPy.  If you want to work from another branch, then you can just 
change it using "git checkout branchname".

Aaron Meurer

> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" 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?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to