On Jan 14, 2008 4:49 PM, Alan Bromborsky <[EMAIL PROTECTED]> wrote: > > > Ondrej Certik wrote: > > On Jan 13, 2008 11:30 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > >> On Jan 13, 2008 7:09 PM, Alan Bromborsky <[EMAIL PROTECTED]> wrote: > >> > >>> Ondrej Certik wrote: > >>> > >>>> On Jan 13, 2008 5:58 PM, Alan Bromborsky <[EMAIL PROTECTED]> 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? > >>>>> > >>>>> > >>>> Don't know about numpy. But I think the quickest way is to get rid > >>>> of the sequence protocol in sympy, i.e. don't use > >>>> > >>>> sin(x)[:] but sin(x).args[:] > >>>> > >>>> then numpy should start working with sympy like a charm. This is the > >>>> issue: > >>>> > >>>> http://code.google.com/p/sympy/issues/detail?id=556 > >>>> > >>>> And I submitted my first code yesterday: > >>>> > >>>> http://groups.google.com/group/sympy-patches/browse_thread/thread/bc52b09cea44893d > >>>> > >>>> now the whole sympy needs to be fixed to use .args[:] and that's it. > >>>> > >>>> Ondrej > >>>> > >>>> > >>>> > >>> How would you use this so that if X and Y are numpy arrays stuffed with > >>> sympy expressions and z is a sympy expression so that X+Y, X-Y, and z*X > >>> are correctly evaluated??????? > >>> > >> I have a surprise for you: I just created patches for that in the issue: > >> > >> http://code.google.com/p/sympy/issues/detail?id=556 > >> > >> before they get reviewed and pushed into our official repo, you can > >> try it like this: > >> > >> $ hg clone http://hg.certik.cz/sympy-devel/ > >> > > > > It's already pushed into our main repo, so you can do just: > > > > $ hg clone http://hg.sympy.org/sympy > > > > as usual. > > > > > > > > > > Thank you! Thank you! Thank you!
No problem. I am sure you'll find more problems, so please report them and we'll try to fix it. Currently I know of problems when converting sympy Matrix <-> numpy matrix. I hope to fix this till the end of the week. 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 -~----------~----~----~----~------~----~------~--~---