On Jan 13, 2008 10:53 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > > Alan Bromborsky wrote: > > The quickest way for me to get my geometric algebra module working with > > sympy is to override the +,-, and * operators in numpy so that they work > > with sypmy objects as array components. However, I have not found any > > references on how to override operators in exisiting modules. Is there > > anyway to do this without modifying the code in the numpy module? > > What kind of arrays do you have? Are they dtype=object arrays? If so, just > override the __add__, __radd__, etc. methods on the objects you put into the > arrays. > > http://docs.python.org/ref/numeric-types.html
The problem was, that numpy's array cannot handle objects, that override sequence protocol. We did that in sympy but I just removed it in the latest patch and now everything seems to work just fine. Ondrej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---