Python 3.5 has the new @ operator, which has the same precedence as *. You won't be able to use it in library code, but it could be useful as one of the operators.
Aaron Meurer On Tue, Oct 20, 2015 at 7:27 PM, Jason Moore <[email protected]> wrote: >> So something will need to be added to the order of operations handler... >> any idea on how to start on this? Is that an error from decorators.py? > > This is fixed in Python and is not something we can change. My opinion is > that overloading the operators like this at all is a bad idea in Python. I'd > rather not have them there at all. > > > Jason > moorepants.info > +01 530-601-9791 > > On Tue, Oct 20, 2015 at 5:02 PM, Justin <[email protected]> wrote: >> >> Hi, >> >>> >>> Something I'd really like to see changed in the vector module, is the >>> dependence of these operators on the coordinate system. That is, you define >>> the grad, curl, div operators for every coordinate system. This is not >>> necessary, because base_scalars and base_vectors all contain a reference to >>> their coordinate system instance. >>> >>> In SymPy, remember to access to parameters passed to the constructor with >>> obj.args >> >> >> So I did some playing around here and found that when a vector is >> constructed with VectorAdd or VectorMul the system reference is lost in >> obj.arg as you mentioned. It's still there, just buried in tuples of >> BaseScalar and BaseVector instances. Should we add a system property to the >> classes for basis dependent classes (basisindependent.py). >> >>>> >>>> They both check out. Next, something will have to be done for dot >>>> products to check: >> >> >> Dot products are fine... granted one puts parenthesis around them. For >> example: >> >> >>> r + r * dr & dr >> >> TypeError: r cannot be interpreted correctly >> >> >> >>> r + r * (dr & dr) >> >> 2 * spherical_r >> >> >> So something will need to be added to the order of operations handler... >> any idea on how to start on this? Is that an error from decorators.py? >> >> >>>> >>>> 3) grad(fg) --> laplacian(fg) = f laplacian(g) + 2 * grad(f) (dot) >>>> grad(g) + g laplacian(f) >> >> >> Whoops! >> >>>> >>>> 4) curl(curl(A)) = grad(div(A)) - laplacian(A) >>> >>> >>> Did you write some code? Did you post it on github? >> >> >> Following Jason's post I fetched the branch from your repo and started >> doing testing. I haven't done much coding; I did add the laplacian to >> functions.py. Should I push to you on a different branch or stop, fork and >> continue? >> >>> >>>> I'll see if I can get a hold of him and see where he is at (or, if you >>>> (Upabjojr) keep up with posts, message me on here). >>> >>> >>> Hello there! >> >> >> Hi back! >> >> So, I think for now I will focus on adding a system property to the >> BasisDependent(Add)Mul classes and then debug the order of operations issue. >> Let me know how you would like to handle the push (it should be fine to push >> to you because I'm on a different branch and will have to submit a pull >> request to you anyways). >> >> >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/sympy. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/a43cffe0-c8f1-4654-8c3b-ac319a0a66ad%40googlegroups.com. >> >> For more options, visit https://groups.google.com/d/optout. > > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CAP7f1AhXKJkmYW7v%3Drw_aD4oXpMjG0LkgDQ50Xxd4SvKMzDTYw%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JN77y4PLyWWnhPWMZX_ach5h0vX8N-fOjLTuN7t7U5AA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
