Re: Issue 3214 in sympy: KeyError with radsimp()
Updates: Labels: NeedsReview Comment #5 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Regarding the xreplace solution, I'm not convinced that that will always work. It should work if the place where the match keys are used is mathematically equivalent to the match expression (as it is in this case), so that the missing keys just disappear. But anyway, I think issue 1577 *is* this issue, so let's move the discussion about that to there. -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 2101 in sympy: latex printing with piecewise function : reversed expr and cond
Updates: Status: Fixed Comment #6 on issue 2101 by ness...@gmail.com: latex printing with piecewise function : reversed expr and cond http://code.google.com/p/sympy/issues/detail?id=2101 Fixed: https://github.com/sympy/sympy/pull/1174 -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 2894 in sympy: Several options in latex() don't work
Updates: Status: Fixed Comment #4 on issue 2894 by ness...@gmail.com: Several options in latex() don't work http://code.google.com/p/sympy/issues/detail?id=2894 Fixed: https://github.com/sympy/sympy/pull/1174 -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3062 in sympy: set and frozenset are not printed correctly with latex()
Updates: Status: Fixed Comment #5 on issue 3062 by ness...@gmail.com: set and frozenset are not printed correctly with latex() http://code.google.com/p/sympy/issues/detail?id=3062 Fixed: https://github.com/sympy/sympy/pull/1174 -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3165 in sympy: latex() shows incorrect answer for logic expressions: parenthesis omitted
Updates: Status: Fixed Comment #2 on issue 3165 by ness...@gmail.com: latex() shows incorrect answer for logic expressions: parenthesis omitted http://code.google.com/p/sympy/issues/detail?id=3165 fixed: https://github.com/sympy/sympy/pull/1174 -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Comment #6 on issue 3214 by ronan.l...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Yes, you're right. The xreplace() technique works in a few more cases, but it's just as unreliable as using the dict directly. The only clear advantage (but is it really one?) is that it can never raise. -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Comment #7 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Let's move the discussion over to issue 1577. -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 1577 in sympy: match doesn't put every wild as a key
Updates: Status: Valid Comment #7 on issue 1577 by asmeu...@gmail.com: match doesn't put every wild as a key http://code.google.com/p/sympy/issues/detail?id=1577 This came up again in issue 3214. A solution was proposed there to use xreplace() where ever you use the match dictionary. This only works if that expression is such that the missing keys go away. It works fine for the expression in that issue, but it doesn't generalize. I think here it won't work, for example, because we are checking the condition on n before we substitute it into the expression. Maybe we need to always exclude 0 on coefficients, like: In [177]: a = Wild('a', exclude=[0, x]) In [178]: n = Wild('n', exclude=[x]) In [179]: print S(0).match(a*x**n) None as opposed to In [175]: a = Wild('a', exclude=[x]) In [176]: S(0).match(a*x**n) Out[176]: {a: 0} (I'm actually surprised that that works) Of course, if you really do want to handle the case where the coefficient is 0, then you'll need to do something like the xreplace() solution. These two ways still might not handle every possible case, though. But the worst part of it is that people won't consider these corner cases when building the match expression. In all, code that uses pattern matching is messy, because if you don't use the right excludes or don't consider corner cases like this, you'll get unexpected results, as we've seen time and time again. I'm wondering if there isn't a completely different way of doing pattern matching that would be better. -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Updates: Status: Fixed Comment #8 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 This was merged. -- You received this message because you are subscribed to the Google Groups sympy-issues group. To post to this group, send email to sympy-issues@googlegroups.com. To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Updates: Labels: NeedsReview Comment #5 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Regarding the xreplace solution, I'm not convinced that that will always work. It should work if the place where the match keys are used is mathematically equivalent to the match expression (as it is in this case), so that the missing keys just disappear. But anyway, I think issue 1577 *is* this issue, so let's move the discussion about that to there. -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
Re: Issue 2101 in sympy: latex printing with piecewise function : reversed expr and cond
Updates: Status: Fixed Comment #6 on issue 2101 by ness...@gmail.com: latex printing with piecewise function : reversed expr and cond http://code.google.com/p/sympy/issues/detail?id=2101 Fixed: https://github.com/sympy/sympy/pull/1174 -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Comment #6 on issue 3214 by ronan.l...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Yes, you're right. The xreplace() technique works in a few more cases, but it's just as unreliable as using the dict directly. The only clear advantage (but is it really one?) is that it can never raise. -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Comment #7 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 Let's move the discussion over to issue 1577. -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
Re: Issue 3214 in sympy: KeyError with radsimp()
Updates: Status: Fixed Comment #8 on issue 3214 by asmeu...@gmail.com: KeyError with radsimp() http://code.google.com/p/sympy/issues/detail?id=3214 This was merged. -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
Re: [sympy] Merging GSoC code sooner this year
On Sun, Apr 1, 2012 at 11:35 PM, Joachim Durchholz j...@durchholz.org wrote: You'll have to explain what atomic is. This can range from five-liners to five-thousand-liners. That's my point exactly. My point here is that a five-LoC commit, even if it's atomic, isn't worth it. And a 5000-LoC commit, no matter how well it fits the atomic definition, is not reviewable and should be redesigned so that smaller atomic commits can be made. If it's a five-line orthoganl bugfix, this should probably be submitted as a separate pull request. I agree that such a small change within the project is probably too small for a single pull request (that's only useful if you don't plan on doing any additional work, which won't be the case for GSoC projects). A figure of a few hundred lines is not technically correct, but it will nudge people in the right direction. (Which is good enough in this context.) On a related point: To use atomicity as a criterion, we need a definition. My definition would be: Cannot be broken into pieces without losing property XYZ. However, I'm coming up blank with what XYZ is, and without that, the criterion cannot be applied. In fact I think the definition of XYZ is the salient point here. I was thinking that XYZ would be something along the lines of a passing test suite for the function. That may sound silly, but this is exactly when the code works, which means that it can be submitted. If the tests don't pass (assuming you've written all test cases already), then you still need to work on the code. And as I said, this will encourage good coding practices like writing tests before code, writing tests for internal functions (instead of just for the public interface), and writing documentation with the code. By the way, another idea we could try is to use a time based metric instead of a size one. So, for example, we could say that once a week (say), the student should submit what he has done (that works). I think reviewing a week's worth of code is reasonable. This should be more accurate than line- or commit-based metrics, I think, because the time to review code should be roughly proportional to the time it took to write it. Anyway, let's play with it. I think we should just see what works for each mentor/student pair. Aaron Meurer In general, I think both the definition of atomicity and ballpark figures would be useful to newcomers (experienced developers already know what a good pull request is). So something like this might work: Pull requests need to be 'atomic', i.e. [definition of 'atomic' goes here]. If unsure, aim for a pull request size of around 300-500 lines of new code. -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] GSoC: Sparse matrix proposal
Hello! I am an undergraduate third year computer science student. I read about the work that is required for improving the sparse matrix module in SymPy. As I have coded sparse matrix algorithms (using C) in the past, I would like to work on them again. I read the Ideas page and found quite a number of interesting topics on sparse matrix. Priority wise I would like to continue with the incomplete code on sparse matrix by a past GSoC student (or start from scratch if required), and work along with on a couple of other high priority features. I would be grateful if you could guide me with the number of features on which i should ideally work, so as to create an efficient timeline for the proposal. Thank you -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSOC 2012 Proposal
Hi, David, On Sun, Apr 1, 2012 at 4:14 PM, David Joyner wdjoy...@gmail.com wrote: On Sun, Apr 1, 2012 at 5:28 AM, Gaurav Sathe gaurav.sath...@gmail.com wrote: Hi, PFA my proposal for GSOC 2012 for the topic Group Theory . I would really appreciate any suggestions and changes from the community which would improve the proposal. Please let me know . What concrete classes of groups do you have experience with in your studies? I have mainly studied abelian groups and permutation groups, I do have a general idea about Matrix groups also. However I would like to implement mainly the abstract group as I have a better command over it. How I plan to implement it is as follows: There will be a main Group class. Each group object will have a number of methods like finding identity,inverse, order of element, order of group, determining abelian nature, etc Typo: For null space I think you want to say kernel. Also, you could add Image. Implementing a homomorphism class would be nice. Are you doing this for abelian groups? If so, additive or multiplicative? For permutation groups? If so, how are you representing the homomorphism? Yes you are right, by 'null space' I meant the kernel I also think that implementing homomorphism class is a good idea. Yes the homomophisms will be restricted to abelian groups since that will make the implementation a bit simpler. I plan to implement homomorphisms in a way similar to how its done in SAGE, i.e. for multiplicative abelian groups . There will be a class for the set of homorphisms between G and H , i.e Hom(G,H) and the associated methods under this class for each homomorphism object. Do you think it will be possible to implement homomorphisms for non-abelian groups as well? Also are there any other algorithms you think I can implement? Please let me know. Right now I am trying to make a prototype of how the interface should look like. I think that will give a better idea. Thnx Thank you. -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/INJ9ucpALu4J. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en. -- Gaurav Sathe -Student at BITS Pilani - Goa Campus -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSOC 2012 Proposal
On Mon, Apr 2, 2012 at 4:23 AM, Gaurav Sathe gaurav.sath...@gmail.com wrote: Hi, David, On Sun, Apr 1, 2012 at 4:14 PM, David Joyner wdjoy...@gmail.com wrote: On Sun, Apr 1, 2012 at 5:28 AM, Gaurav Sathe gaurav.sath...@gmail.com wrote: Hi, PFA my proposal for GSOC 2012 for the topic Group Theory . I would really appreciate any suggestions and changes from the community which would improve the proposal. Please let me know . What concrete classes of groups do you have experience with in your studies? I have mainly studied abelian groups and permutation groups, I do have a general idea about Matrix groups also. However I would like to implement mainly the abstract group as I have a better command over it. How I plan to implement it is as follows: There will be a main Group class. Each group object will have a number of methods like finding identity,inverse, order of element, order of group, determining abelian nature, etc It seems to me that to do this you must have a method to enumerate all elements of a group. How do you plan to implement that for the class of abstract groups? I also think that implementing homomorphism class is a good idea. Yes the homomophisms will be restricted to abelian groups since that will make the implementation a bit simpler. I plan to implement homomorphisms in a way similar to how its done in SAGE, i.e. for multiplicative abelian groups . There will be a class for the set of homorphisms between G and H , i.e Hom(G,H) and the associated methods under this class for each homomorphism object. How do you plan to implement to compute the kernel of a homomorphism between two multiplicative abelian groups? For you proposal, I think you need to be as explicit and concrete as possible. Do you think it will be possible to implement homomorphisms for non-abelian groups as well? Also are there any other algorithms you think I can implement? Please let me know. Right now I am trying to make a prototype of how the interface should look like. I think that will give a better idea. Thnx Thank you. -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/INJ9ucpALu4J. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en. -- Gaurav Sathe -Student at BITS Pilani - Goa Campus -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSoC: Sparse matrix proposal
Hello, On Mon, Apr 2, 2012 at 9:49 AM, Rishabh Patel rishabh.mahendra.pa...@gmail.com wrote: I am an undergraduate third year computer science student. I read about the work that is required for improving the sparse matrix module in SymPy. As I have coded sparse matrix algorithms (using C) in the past, I would like to work on them again. While I am totally unaware of the state of sparse matrices in SymPy, I'd like to throw in my two cents and remind you that, in order to make your proposal valid, you should submit (at least) a patch to SymPy before April 23. In order to do this, you should set up your environment according to [0]. Then take a look at the list off issues [1], pick one, fix it and submit a pull request. The issues with the EasyToFix label are easy to fix :-) Good luck with your proposal! Sergiu [0] https://github.com/sympy/sympy/wiki/Development-workflow [1] http://code.google.com/p/sympy/issues/list [2] http://code.google.com/p/sympy/issues/list?can=2q=label%3AEasyToFix+colspec=ID+Type+Status+Priority+Milestone+Reporter+Summary+Starscells=tiles -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Introduction
Hello, On Mon, Apr 2, 2012 at 12:35 AM, Rajul Srivastava rajul.iit...@gmail.com wrote: I shall be grateful if anyone can help me and give me reference to the literature that I may use and also shed some light on how I can go about making a successful proposal. I am quite far from quantum mechanics, but I'll still throw in my two pence: to make your proposal valid, you have to fulfil your patch requirement. To do this, set up your environment according to [0], pick an issue your like here [1] (the issues [2] are easy to fix), and submit a pull request. You should see your pull request merged before April 23. Sergiu [0] https://github.com/sympy/sympy/wiki/Development-workflow [1] http://code.google.com/p/sympy/issues/list [2] http://code.google.com/p/sympy/issues/list?can=2q=label%3AEasyToFix+colspec=ID+Type+Status+Priority+Milestone+Reporter+Summary+Starscells=tiles -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Determining Square
What is the best way of determining if a sympy expression 'x' is the square of another expression 'y' that is 'x = y**2=y*y'? How should one simplify 'x' if 'x' is a general symbolic expression, for the best chance of determining 'y'? What if 'x' is a polynomial in multiple variables? -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: Interested in Plotting module and GSoC 2012
I've not managed to get that pull request, and any matplotlib functionality to work on my computer. (I think I need assistance with regard to how to clone a pull request's edits?) I'm shifting my interest to working on an equation editor. To start off with, I'm working on making a curses-based entry maker with a basic functionality. Curses definitely seems like a good option to make a desktop level equation editor with, though I also plan to explore the other options. I would want to ask if making a equation editor can be a GSoC project for an entire summer. Just the desktop execution in curses, should not take much time. But I'm not very sure how much time it can take to manage a web-based execution, and integration with things like the iPython or qt console. If that can't be an entire GSoC project, I would really want some help on how to get that pull request to work for me, because barely, if any plot functionality has worked for me so far. And the reason why I'm interested in working with plotting, is because I would like to work with respect to representation of plots of multi-dimensional surfaces, among other things. On Saturday, 24 March 2012 11:29:17 UTC+5:30, Aaron Meurer wrote: Yeah, Pyglet is very problematic, especially on Mac OS X. There is indeed work on moving to other backends, primarily matplotlib. See https://github.com/sympy/sympy/pull/673, and also search this mailing list for threads about it. There is a GSoC idea to extend this framework. By the way, the latest version of Pyglet was released in 2010, but there have been active updates in the mecurial repository at http://code.google.com/p/pyglet/. Does the development version work any better? For the equation editor, you need to decide what framework you will use for it. I think for now, we should either go for something curses based or web based. The former would hook into the current pretty printing system. The latter would be something to add into SymPy Live. Hopefully it could also be hooked into the IPython notebook as well, though I dont know to what level they allow extensions like that (you'll have to ask on their list). If extensions are possible in the qtconsole, that would be an idea too, I guess. Aaron Meurer On Fri, Mar 23, 2012 at 10:56 PM, Vishesh Kumar vishesh...@gmail.com wrote: I've spent the entire week trying to get pudb, winpdb, and sympy's plot to work on my macbook pro (OS X 10.6.8), and alternatively in Ubuntu 11 in a virtual machine. I managed to get winpdb and pudb to work. Sympy's plot, almost entirely doesn't. As far as I can tell, lots of digging tells me this is Pyglet's fault. The furthest I managed is, by executing pl.py, a program to plot(x**2) (and some slight variants of it), by entering arch -i386 python2.6 pl.py, I finally got a plot. But the python window that opens up, without fail, refuses to respond. It sounds ambitious to me, but Pyglet has lots of issues on almost all kinds of machines – what is the possibility of trying to shift to a different rendering engine? Could I work on that as my GSoC project? All the functions worked as described on a certain friend's machine, but in no instance on my computer. So it might be the fault of somethings I've installed beforehand etc., but I think that's pretty unlikely, because all errors I get (whenever I did get an error, and it wasn't just python hanging), seem to be Pyglet's issues. Would you say I furnish you with more details? Or can working on an equation editor work as an entire GSoC project? In any way, I would be grateful to receive some direction on how to start off with that (the equation editor). Regards Vishesh Kumar On Saturday, 17 March 2012 01:34:43 UTC+5:30, Vishesh Kumar wrote: I am interested in working at the equation editor task and/or improving the plotting module, as possible projects for GSoC 2012. I would love to know how to start out with either, and what aspects I should approach. With regard to the plotting module, it seems like a vast thing in entirety, but I don't know if we'd be required to work on all of it or choose some subset of that. In either case, I don't have much idea of the same by default, and would be grateful to receive some initial guidance, with regard to starting off. --- Regards Vishesh Kumar -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/jFAEywPqU0sJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 view this discussion
Re: [sympy] sympy/polys/domains: Ring vs. RingDomain
On Sun, Apr 1, 2012 at 9:08 PM, Ronan Lamy ronan.l...@gmail.com wrote: Le dimanche 01 avril 2012 à 18:54 +0300, Sergiu Ivanov a écrit : It should be possible to have operation-unaware classes for elements and operation-aware rings, and then define simple ring-aware wrappers for elements which will take care of making a*b and R.mul(a,b) equivalent. I'm not sure about how well Python inlines functions, but if does a decent job of this, the code a*b will be directly reduced to R.mul(a,b) and thus no run-time performance penalty will follow. Python doesn't inline functions. It's a rather fundamental part of its semantics that makes tracebacks and debuggers possible. PyPy's JIT compiler detects cases where inlining is possible without affecting the behaviour of the program, but CPython (the standard implementation of Python) doesn't have a JIT, so it never inlines. Oh, I see. Thank you for the information! Besides, how can a and b know which they belong to? This would require having several different versions of e.g. sqrt(6): one in QQ[sqrt(6)], one in QQ[sqrt(2), sqrt(3)], one in RR, one in CC, ... IIUC, Sage does exactly that, but it feels profoundly wrong. It should clearly be the other way round: R.mul(a, b) should be defined as a*b. And since we'd like ring operations to be symbolic objects, we should even have R.mul = Lambda((x, y), x*y). I am afraid this pertains to a particular case of what we are discussing in this thread. While QQ, RR, CC are indeed rings, we are not that interested in their *ring* structure when we are working with elements thereof. Moreover, multiplication in RR is a restriction of multiplication in CC, ditto for QQ. This makes a similar notation (*) for all three operations acceptable. Indeed, it would be odd to require the user to write QQ.mul(2, 3) instead of the clear and natural 2 * 3. However, it is very dangerous to make *any* ring multiplication look like (*), because it will compel the user to memorise which variables belong to which ring. The situation gets even worse should we consider two different rings over the same set of elements. Note that, as I suggested, should the usage of (*) be unambiguous in a piece of code, it is easy to create operation-aware element wrappers, or even to bind the operation to the elements for efficiency, as it happens now. In these cases the currently existing class Ring will certainly work nicely. However, I totally think that, for the general case, tying the operation to elements is a bad idea. Again, note that I don't promote the abolition of the current Ring class, but rather renaming it to RingDomain. In conclusion, I cannot see how my ideas fundamentally contradict the approaches evoked in this thread. Therefore, I will try to pose the dual question: do you think the current Ring class is well-suited for a future implementation of ring theory? I hope a definite answer to this question will be more reachable :-) Sergiu -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] function to get 'power' of an expression wrt other
Hello, I wanted to know if there is already, a function written in sympy to find the power of an expression wrt to another, just like in the following case: 1/f(x)**2 wrt to f(x), it should return the value ' -2 ' . and in the following case : 1/(f(x)*g(x)) wrt to g(x), it should return ' -1 ' . *-thanks,* *Sai Nikhil.T http://www.tsndiffopera.in/* * * * * * * *1* -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Re: function to get 'power' of an expression wrt other
hello, sorry for asking this easy thing. anyways, I was able to find the answer myself. *-thanks,* *Sai Nikhil.T* http://www.tsndiffopera.in * * * * *1* On 2 April 2012 20:26, Sai Nikhil tsnleg...@gmail.com wrote: Hello, I wanted to know if there is already, a function written in sympy to find the power of an expression wrt to another, just like in the following case: 1/f(x)**2 wrt to f(x), it should return the value ' -2 ' . and in the following case : 1/(f(x)*g(x)) wrt to g(x), it should return ' -1 ' . *-thanks,* *Sai Nikhil.T http://www.tsndiffopera.in/* * * * * * * *1* -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: Improvement and bug fixing work for SymPy Bot
After reading this discussion about improvements of SymPy bot https://groups.google.com/forum/#!topic/sympy/0u8coqHunkc/discussion I get some new ideas for my project: - Priorities based on - issue labels - hight and critical first. Actually, web application could extract labels from related issue(if it exists of course) - count of comments - sorting pulls by count of comments and review most popular pulls first - Pulls with issues ranked as high or critical will have greater priority than pulls with many comments. - SymPy bot will be able to run tests on different versions of Python(user could add full path to interpreter to config) - Web application will waits some time before moving new pull request to queue(about 30 mins) - If web application gives more than one commits for this pull, then review only latest from them, that will prevent spam - Modified since\Not modified, SymPy bot will gives last time when it ran tests to web application, and it'll answer Not modified if nothing new happens since that time or pulls info if happend. - Not sure about that idea, but in some cases we could ignore some tests which unrelated to current changes, what I mean: - If we're looking on SymPy code tree then we'll see that code has hierarchy. - So, if we make changes in one of core modules then these changes will affect on most part of other code which depends from that module. - But if we make changes in some final functions which lie much deeper in code hierarchy, then in most cases changes in them will not affect on other functions, which located in other modules and not depended from them - Weak place of this idea is how do we know about other modules/classes/functions which using changed code? We could use searching in source code to know that, but is that really good idea? - Sometimes pull request just hangs for long time(e.g. more then one mounth), so web application doesn't include that pull in queue - Silent running, bot will not comment about test result on github, Usefull when we want just make SymPy bot could exchange data with web application in theese ways(some examlpes in pseudo-python-code): 1. Using pickle for storing dict like On web application: import pickle pull_info = {pull_number: (date, commit_hash, [label1,label2], comments_count)} pickled_info = pickle.dumps(pull_info) # and gives that to sympy bot as application/octet-stream 2. Using class class IncomingPull(object): def __main__(self, pull_number, date, commit_hash, labels, comment_count); self.pull_number = pull_number on web-server side: import pickle pulls_for_review = [pull_data1,pull_data2,...] pulls_for_bot = [] for pull in pulls_for_review: pulls_for_bot.append(IncomingPull(value1,value2,...)) picklestring = pickle.dumps(pulls_for_bot) -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/sZSsjpXA3-4J. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Re: GSOC 2012 proposal (Implementing Algorithm for Series Expansion)
Hi, Thanks for the suggestions. I have tried to apply your feedback in the proposal and now it's like this- https://github.com/sympy/sympy/wiki/GSOC-2012-implementing-algorithm-to-find-the-limits-of-series Any more suggestions please Regards, -Saurabh Jha On Apr 2, 12:53 am, Tom Bachmann e_mc...@web.de wrote: Hi, first of all, I think your title is misleading. Kauer's algorithm (as far as I know) is about computing limits, not expanding series. Then you need to put in much more detail. What limits (specifically!) can be solved with the new algorithm that cannot be done with gruntz, and why? How does the algorithm work, in quite a bit more detail? Can you work through one novel example? As far as I know documentation of Kauer's algorithm is very scarce. What sources are you using? Did you inquire about the original source code? Lastly, please observe that we have a patch requirement, as explained on the ideas page: in order to be eligible as a student for sympy, you have to get (at least) one pull request merged. Best, Tom On 01.04.2012 18:46, Saurabh Jha wrote: Hi, My proposal can be found on the SymPy wiki at : https://github.com/sympy/sympy/wiki/GSoC-2012-Application--Saurabh-Jh... Can you please review the same and provide feedback? Thanks and Regards, -Saurabh Jha -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: Interested in Plotting module and GSoC 2012
Hi, I can not say anything about the equation editor, but I may try to help with the plotting module. Whenever you decide to try to make it work again just contact us and describe the problem. To clone it and use it you have to do (more or less) the following: - install git - clone sympy from github.com/sympy/sympy.git - make a new branch - go onto that new branch (i.e. checkout it) - pull onto your new empty branch the branch in which the plotting module is developed (git pull https://github.com/Krastanov/sympy.git plotting) - play with it (You will need matplotlib installed. It would be also very useful to install ipython (which anyway you may need for other possible projects)) If you are working on a linux or mac system you can find step by step explanations in the developer workflow page in our documentation. Stefan -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: function to get 'power' of an expression wrt other
sorry for asking this easy thing. anyways, I was able to find the answer myself. What is it (the answer)? -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: function to get 'power' of an expression wrt other
firstly one has to know under which category the function comes, in sympy eg. e=1/log(x)**2 the command, e.func gives sympy.core.power.Pow and so, its the core module one has to target at. I went there and opened power.py and searched through the class Pow, to get the attribute exp. therefore, the command e.exp gives me the exponent of the base i.e., ' -2 ' here and the command e.base gives me the base i.e., 'log(x)' *-thanks,* *Sai Nikhil.T http://www.tsndiffopera.in/* * * * * * * *1* -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Function refine doesn't work with re(x) and im(x)
On 02.04.2012 13:40, Juan Luis Cano Rodríguez wrote: An expression can be simplified adding assumptions /a posteriori/ using the refine() function: In [33]: refine(sqrt(x ** 2), Q.real(x)) Out[33]: │x│ but this doesn't seem to work in the complex case when the re() and im() functions are involved: In [37]: refine(im(x), Q.real(x)) # I expect 0 Out[37]: im(x) In [38]: refine(re(x), Q.real(x)) # I expect x Out[38]: re(x) In [39]: refine(re(x), Q.imaginary(x)) Out[39]: re(x) In [40]: refine(im(x), Q.imaginary(x)) Out[40]: im(x) Is this a bug or am I missing something? I believe the whole Q.ask / refine / new assumptions stuff has never been fully incorporated / implemented. So my default is not to expect any of this to work. But I may be wrong. -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/Knpy95uKwY8J. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: function to get 'power' of an expression wrt other
You could also use expr.as_base_exp(), which works even if expr is not a Pow. Aaron Meurer On Mon, Apr 2, 2012 at 11:43 AM, Sai Nikhil tsnleg...@gmail.com wrote: firstly one has to know under which category the function comes, in sympy eg. e=1/log(x)**2 the command, e.func gives sympy.core.power.Pow and so, its the core module one has to target at. I went there and opened power.py and searched through the class Pow, to get the attribute exp. therefore, the command e.exp gives me the exponent of the base i.e., ' -2 ' here and the command e.base gives me the base i.e., 'log(x)' -thanks, Sai Nikhil.T 1 -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Determining Square
Your question is somewhat vague, because anything could be considered the square of its square root. Clearly sqrt(x) will give you such a y, though I think this is not what you want. I'm assuming that for polynomials, you only want y that is also a polynomial. In that case, you should first apply sqf() to it, which will do a partial factorization useful for getting square powers. sqf_list() will return a form more useful for modifying the powers. For example, you can do all(not i[1] % 2 for i in sqf_list(poly)[1]) to determine if poly is a perfect square. I'll leave the command to reduce each power by a half and multiply them back together as an exercise. For generic expressions, it really depends on how you want to limit what y can be. If you have x, is sqrt(x) a suitable y? If you have exp(x), is exp(x/2) a suitable y? Aaron Meurer On Mon, Apr 2, 2012 at 7:21 AM, Alan Bromborsky abro...@verizon.net wrote: What is the best way of determining if a sympy expression 'x' is the square of another expression 'y' that is 'x = y**2=y*y'? How should one simplify 'x' if 'x' is a general symbolic expression, for the best chance of determining 'y'? What if 'x' is a polynomial in multiple variables? -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: function to get 'power' of an expression wrt other
I see . -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Introduction
Hi, My name is Pulkit Jain, I am an undergraduate student at the Department of Mathematics, Indian Institute Of Technology Kharagpur, currently in my Third Year of the Five Year Integrated Masters course of Mathematics and Computing. I wish to apply for GSoC 2012 and as I was browsing through the list of organizations, I came across SymPy. I have gone through the projects listed on the Ideas page and I am interested in applying for the projects concerning Linear Algebra, Group Theory and Ordinary Differential Equtions. Although I find all the projects listed worth-a-while, but I am particularly interested in Implementing a sparse matrix representation for Matrix, so we can efficiently manipulate large sparse matrices , Solving Differential Equations in Terms of Bessel Functions, An algorithmic approach to exact power series solutions of second order linear homogeneous differential equations with polynomial coefficients. I have been programming since the age of 15 and I have used languages like C, Java, Python and a bit of C++, during my span of programming, I find python the most interesting because of its simplicity and simple approaches and also have a fair amount of experience of programming in it. My past courses in these areas have played an instrumental role in developing my interest in them. I shall be obliged if anyone can help me in regard of how I should go about making making my proposal and where can I look for references. -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSOC proposal (add plot functionality to sympy live and ascii plotting)
I don't get the point of doing it that way. Wouldn't that mean that you always do the arithmetic in mpmath, and then only convert to numpy at the end? That would defeat the purpose of using numpy. Probably it's better to create a library that is backend agnostic, and plug numpy and mpmath into it (but do it in such a way so that you can still take advantage of the mpi functionality that is already in mpmath). Aaron Meurer On Sat, Mar 31, 2012 at 11:44 PM, Bharath M R catchmrbhar...@gmail.com wrote: @Aaron Stefan I thought about the interval arithmetic implementation and I came up with this. Derive from mpmath interval arithmetic class and implement all the features. Add an `to_ndarray()` function to the class which converts the interval to an numpy array. An `eval(expr, lib = 'numpy') which evaluates and returns the result based on the rules. Is this a good strategy? or should I implement the complete interval arithmetic in sympy separately. -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/_PSpO9E6gNcJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: GSoC Idea
Now that you put it that way, it makes sense to me. :) Thanks! Angadh I agree with Tim; I think the effort would be better spent making the existing functionality interact with well tested and reliable solvers,. To address the scipy/numpy dependency issue, I think getting sympy.physics.mechanics into sage would solve this problem very well. Luke -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Sympy for Android
On Fri, Mar 30, 2012 at 4:23 PM, Vipul Amler vipulnsw...@gmail.com wrote: On Thu, Mar 22, 2012 at 10:59 AM, Aaron Meurer asmeu...@gmail.com wrote: On Wed, Mar 21, 2012 at 7:49 AM, Roberto Colistete Jr. roberto.colist...@gmail.com wrote: Em 21-03-2012 07:37, Vipul Amler escreveu: Hi, again Hi Roberto, I am working on an emulator. 2.2 I happen to have tried out sl4a for python, along with WebView. {The example you listed and others, although dint check FullScreenUI} Also sympy seems to work form within sl4a, properly {way slow on the avd} Hi Vipul, I don't like emulators, I develop directly (using Python) on Android 2.2 (on Nokia N900 running NITDroid) and Android 3.2/4.0 (on Asus Transformer). By the way, I develop directly on PDA, tablets and smartphones since the Psion's days (1999 until today), from OPL to Python, sometimes in C/C++ (on Maemo/MeeGo). So, I want to know what example you expect, or perhaps what I should be making? My advice to you, sent 2 days ago, was : try to make until beginning of April a simple example using Python SL4A with webview UI to show your capacity, maybe also using SymPy. You can also mix Python SL4A webview UI with Facade UI, see my Python webview template (with commented source-code) : http://www.robertocolistete.net/Python/Android/ It is my first time trying to participate in GSoC (as a mentor), so I think it would be better to also get the opinion from the SymPy community. After my submissions{last week, which consumed my time}, and scanning past the sl4a tutorials, I have got a bit of idea about the whole sl4a environment. Although there is not much literature, {apart from the book ofcourse}, I could find scarce code example for sl4a webview One, amongst them was Roberto's itself from over at [1], and other was this [2] I was able to package Roberto's script into [3] a full fledged apk, that calls the python script.. I am having issues in the callbacks to the html page from python script, which I am trying to figure out. {this is in reference to Roberto's script} Moreover, initial lookout of mine was to get comfortable with sl4a, which I guess I have become for now. I l be producing 1-2 examples to demonstrate sl4a Webview usage, from below * Simple TODO Notes Manager * Simple Calculator * etc I was not able to think of more examples. Will send in the above demo's in my next mail. Regards, Roberto I agree with this advice. Aaron Meurer About the GSoC Proposal, how should I be looking at it now? I mean what features are to be envisioned, etc. I need to focus on this too for now, as the deadline ends soon. The deadline is nearing so I have put in a draft proposal over at https://github.com/sympy/sympy/wiki/GSoC-2012-Application-Vipul-A-M-:-Sympy-for-Android . Please let me know any feedback so that I can make changes accordingly. P.S. The script from [3] successfully loads the sympy module in android, and makes use of it. [1] http://www.robertocolistete.net/Python/Android/ [2] https://github.com/georgegoh/cellbot-controller [3] https://github.com/vipulnsward/WebViewSL4A -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: I am interested in applying to Google Summer of Code to work on a SymPy project
Did you see my email about the Euler-Lagrange equations of motion that I sent earlier today? One important point is that there is absolutely no reason to have a custom Lagrangian class. You can just build the Lagrangian as a standard sympy expression. One reason to have a custom Lagrangian class is that it helps keep track of systems where you have a large number of particles/bodies/constraints/interacting forces. For simple systems you can surely write the Lagrangian in a line or two, but for more interesting systems, it becomes onerous and error prone to do this manually. Having a class which allows you to pass it a list of particles/bodies, and the forces/torques acting on them, as well as any kinematic constraints that may be present, greatly simplifies the work the user must do and reduces the likelihood of making a mistake. I see many reasons to have a custom Lagrangian class. Luke -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] sympy/polys/domains: Ring vs. RingDomain
On 02.04.2012 15:30, Sergiu Ivanov wrote: In conclusion, I cannot see how my ideas fundamentally contradict the approaches evoked in this thread. Therefore, I will try to pose the dual question: do you think the current Ring class is well-suited for a future implementation of ring theory? I hope a definite answer to this question will be more reachable :-) I think the only reasonable answer is yes, but The real problem with this discussion is, imho, that you are trying to propose a perfect framework, without any specific examples to test perfectness against. No matter how much we talk this over, trying to design code for such a complex system (at least all of ring theory, you seem to have even more in mind) on the drawing board is futile (in my opinion). Moreover, this proposal seems embedded in your gsoc plans, where it really does not fit: there is no need or justification for trying to write a perfect, all-encompassing object oriented framework in order to implement the groebner walk stuff (at the most, I think, this requires a very specialised framework - most of which I believe can already be found in domains/). -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: I am interested in applying to Google Summer of Code to work on a SymPy project
On Mon, Apr 2, 2012 at 4:23 PM, Luke hazelnu...@gmail.com wrote: One reason to have a custom Lagrangian class is that it helps keep track of systems where you have a large number of particles/bodies/constraints/interacting forces. For simple systems you can surely write the Lagrangian in a line or two, but for more interesting systems, it becomes onerous and error prone to do this manually. Having a class which allows you to pass it a list of particles/bodies, and the forces/torques acting on them, as well as any kinematic constraints that may be present, greatly simplifies the work the user must do and reduces the likelihood of making a mistake. I see many reasons to have a custom Lagrangian class. I can see a reason to have a class to hold the Lagrangian (i.e., the work-energy expression), but the Euler-Lagrange equation itself should be broken out separately since it has uses far beyond mechanics. I've been thinking about writing support for general Calculus of Variations in SymPy, but it's likely to wait until the end of the summer at the earliest. Cheers, Tim. -- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://about.me/tjlahey -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] sympy/polys/domains: Ring vs. RingDomain
Le lundi 02 avril 2012 à 21:28 +0100, Tom Bachmann a écrit : On 02.04.2012 15:30, Sergiu Ivanov wrote: In conclusion, I cannot see how my ideas fundamentally contradict the approaches evoked in this thread. Therefore, I will try to pose the dual question: do you think the current Ring class is well-suited for a future implementation of ring theory? I hope a definite answer to this question will be more reachable :-) I think the only reasonable answer is yes, but For me, the answer is clearly no. The real problem with this discussion is, imho, that you are trying to propose a perfect framework, without any specific examples to test perfectness against. No matter how much we talk this over, trying to design code for such a complex system (at least all of ring theory, you seem to have even more in mind) on the drawing board is futile (in my opinion). I don't think Sergiu is trying to implement all of ring theory. He only needs to implement the basics of the language of ring theory, which is much easier. Currently, there's no way to represent let A = (E, +, .) be a ring in sympy. Fixing that is a prerequisite for implementing any part of ring theory. Moreover, this proposal seems embedded in your gsoc plans, where it really does not fit: there is no need or justification for trying to write a perfect, all-encompassing object oriented framework in order to implement the groebner walk stuff (at the most, I think, this requires a very specialised framework - most of which I believe can already be found in domains/). You could say that for any kind of high-level framework. It's theoretically possible to program everything in assembler, so why do we bother with Python? Well, the answer is obvious: it makes a lot of things much easier. -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: I am interested in applying to Google Summer of Code to work on a SymPy project
Luke, On Mon, Apr 2, 2012 at 1:23 PM, Luke hazelnu...@gmail.com wrote: Did you see my email about the Euler-Lagrange equations of motion that I sent earlier today? One important point is that there is absolutely no reason to have a custom Lagrangian class. You can just build the Lagrangian as a standard sympy expression. One reason to have a custom Lagrangian class is that it helps keep track of systems where you have a large number of particles/bodies/constraints/interacting forces. For simple systems you can surely write the Lagrangian in a line or two, but for more interesting systems, it becomes onerous and error prone to do this manually. Having a class which allows you to pass it a list of particles/bodies, and the forces/torques acting on them, as well as any kinematic constraints that may be present, greatly simplifies the work the user must do and reduces the likelihood of making a mistake. I see many reasons to have a custom Lagrangian class. OK, I can see that such a class would be useful for more complex systems, especially when things like constraints come into play. But, users should always be able to define a Lagrangian using regular sympy expressions. Also, the underlying Euler-Lagrange equations should work with regular sympy expressions as well. Cheers, Brian Luke -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en. -- Brian E. Granger Cal Poly State University, San Luis Obispo bgran...@calpoly.edu and elliso...@gmail.com -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: I am interested in applying to Google Summer of Code to work on a SymPy project
Tim, On Mon, Apr 2, 2012 at 1:37 PM, Tim Lahey tim.la...@gmail.com wrote: On Mon, Apr 2, 2012 at 4:23 PM, Luke hazelnu...@gmail.com wrote: One reason to have a custom Lagrangian class is that it helps keep track of systems where you have a large number of particles/bodies/constraints/interacting forces. For simple systems you can surely write the Lagrangian in a line or two, but for more interesting systems, it becomes onerous and error prone to do this manually. Having a class which allows you to pass it a list of particles/bodies, and the forces/torques acting on them, as well as any kinematic constraints that may be present, greatly simplifies the work the user must do and reduces the likelihood of making a mistake. I see many reasons to have a custom Lagrangian class. I can see a reason to have a class to hold the Lagrangian (i.e., the work-energy expression), but the Euler-Lagrange equation itself should be broken out separately since it has uses far beyond mechanics. I've been thinking about writing support for general Calculus of Variations in SymPy, but it's likely to wait until the end of the summer at the earliest. The Euler-Lagrange module I posted as a sympy issue already handles most Lagrangians. The only thing I did not include is constraints, but that should not be too diffcult to add. Cheers, Brian Cheers, Tim. -- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://about.me/tjlahey -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en. -- Brian E. Granger Cal Poly State University, San Luis Obispo bgran...@calpoly.edu and elliso...@gmail.com -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] sympy/polys/domains: Ring vs. RingDomain
On Mon, Apr 2, 2012 at 8:40 AM, Sergiu Ivanov unlimitedscol...@gmail.com wrote: On Sun, Apr 1, 2012 at 10:26 PM, Aaron Meurer asmeu...@gmail.com wrote: On Sun, Apr 1, 2012 at 12:08 PM, Ronan Lamy ronan.l...@gmail.com wrote: Besides, how can a and b know which they belong to? This would require having several different versions of e.g. sqrt(6): one in QQ[sqrt(6)], one in QQ[sqrt(2), sqrt(3)], one in RR, one in CC, ... IIUC, Sage does exactly that, but it feels profoundly wrong. I agree with this. Doing it this way feels like just too much unnecessary work (for the user). I think it makes sense to just define sqrt(6) in one way, namely, as 6**(1/2), and let each ring or field figure out how it makes sense in itself (or doesn't). This feels natural because sqrt(6) is actually implemented as Pow(6, Rational(1, 2)). Maybe if you are treating QQsqrt(6) as a vector space, you can internally convert sqrt(6) to something like [0, 1]. But the coercion rules should make it so that you never need to even care about that, unless you are specifically working with code that requires this implementation, or if you are in the coercion code. I think we absolutely must distinguish between concrete rings of numbers and abstract rings. I absolutely agree that having the user explicitly specify which sqrt() to apply to a given number goes against usual practise. However, just as Tom says, I don't see absolutely any problem with the fact that an *abstract* ring will have to explicitly define sqrt(), should this definition make any sense. It should clearly be the other way round: R.mul(a, b) should be defined as a*b. And since we'd like ring operations to be symbolic objects, we should even have R.mul = Lambda((x, y), x*y). So supposing that we had QQsqrt(6), and we wanted to define a*b as [a1*b1 + 6*a2*b2, a1*b2 + a2*b1], where a = [a1, a2], b = [b1, b2], and a = [a1, a2] means that a = a1 + a2*sqrt(6). Would it make sense to make R.mul equal to Lambda((x, y), x.as_vector()*y.as_vector())? This would make sense *iff* R would have a large number of useful properties (for example, if it were a vector space). Attempting to transform the arguments of R.mul to vectors imposes a lot of unnecessary restrictions on R (like that it should be isomorphic to a vector space). I hope I understood your statement correctly. I meant just for this specific R, QQsqrt(6). Other rings may have a different multiplication rule. Aaron Meurer Sergiu -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] GSoC deadline looming
This is just a friendly reminder to all the GSoC students that the GSoC deadline is this Friday, April 6 at 19:00 UTC (just under four days from now). The deadline is very hard: in the past, Google has not extended it for any reason whatsoever, even if there are network problems. I see several proposals on the wiki that are not in Melange. If you haven't submitted your proposal in Melange [0], please do so now. You will be able to change it up until the deadline. We cannot accept any student unless they have submitted a proposal in Melange. You do not want to wait until the deadline to submit and have connection issues and be left out. I also want to remind you that if you have not yet submitted a patch for your patch requirement, you must do so by this date too. The patch does not need to be merged until the acceptance deadline (April 20), but the pull request must be submitted by this date. This is so we have enough time to review the patch to make sure it can be merged before the acceptance deadline. I didn't check who has done this or not yet. Also, remember to put a link to the pull request(s) in your application itself (as specified in the application template [1]), so we can easily find them when we review them. Good luck to all GSoC students. Aaron Meurer [0] - http://www.google-melange.com/ [1] - https://github.com/sympy/sympy/wiki/gsoc-2012-application-template -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: GSoC Idea
Well all we need to do is release. Then the Sage guys will merge it in. If anyone wants to expedite the process, you could help with blocking issues (http://code.google.com/p/sympy/issues/list?can=2q=Milestone%3DRelease0.7.2+colspec=ID+Type+Status+Priority+Milestone+Reporter+Summary+Starscells=tiles), especially the ones with Priority-Critical. Aaron Meurer On Mon, Apr 2, 2012 at 2:07 PM, Luke hazelnu...@gmail.com wrote: Now that you put it that way, it makes sense to me. :) Thanks! Angadh I agree with Tim; I think the effort would be better spent making the existing functionality interact with well tested and reliable solvers,. To address the scipy/numpy dependency issue, I think getting sympy.physics.mechanics into sage would solve this problem very well. Luke -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Trigonometic Simplification
Hi This is Manoj doing my Btech 3rd year at IIT Kharagpur.I am working on trigonometric simplication by fu..http://rfdz.ph-noe.ac.at/ fileadmin/Mathematik_Uploads/ACDCA/DESTIME2006/DES_contribs/Fu/ simplification.pdf i have samll query this is the code i have written matchers = ( (a*sin(b+c)**d, (a*sin(b)*cos(c) + a* sin(c)*cos(b))**d, 4), (a*cos(b+c)**d, (a*cos(b)*cos(c) - a* sin(c)*sin(b))**d, 4), #(a*tan(b + c)**d, (a*(tan(b) + tan(c))/(1 - tan(c)*tan(b)))**d), (a*cos(2*b)**c, (1 - 2*a*sin(b)**2)**c, 3), (a*sin(2*b)**c, (2*a*sin(b)*cos(b))**c, 3) ) elif expr.is_Add: expr = expr.n() if expr.has(sin,cos) and not expr.has(tan): for pattern,result,n in matchers: ret = S.Zero res = None if expr.is_Add: for term in expr.args: res = term.match(pattern) if res is not None: if len(res) == n and (0 not in res.values()): b # if pattern == (matchers[2][0] or matchers[3,0]) and res[b].is_Mul: # ret += term /b ret += result.subs(res).expand() else: ret += term if res is None: ret += term expr = ret.n() else: break return expr in trigsimp_recursive simplify.py The code is not yet completed...i am presetly working on Rule list 2 TR 10-TR 4-TR3 -''TR 11''-TR5. The problem is (bolded in the code) if the expr contains sin(x).cos(x) etc which were expanded in TR10 ... now using the TR 11 for expr.args its converting sin(x),cos(x) into half angle arguements which is not required and aslo converting cos(2x) in terms of x which is required.What can a solution so that it understands that there is a double angle and converts only that. Is there any sympy function that analyses the arg..ie if there is an expression sin(x) + sin(y) + sin(x/2) then it should return all the symbols in the expr as a tuple (x,y,x/2)..so that it can understand there is a double angle and it can covert only that. or please suggest me some other matcher which evaluates the expansion of only double angle.. -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
[sympy] Re: Trigonometic Simplification
Maybe something like atoms(): http://docs.sympy.org/dev/modules/core.html#sympy.core.basic.Basic.atoms is going to help On Apr 2, 8:47 pm, Manoj babu manoj.babu2...@gmail.com wrote: Hi This is Manoj doing my Btech 3rd year at IIT Kharagpur.I am working on trigonometric simplication by fu..http://rfdz.ph-noe.ac.at/ fileadmin/Mathematik_Uploads/ACDCA/DESTIME2006/DES_contribs/Fu/ simplification.pdf i have samll query this is the code i have written matchers = ( (a*sin(b+c)**d, (a*sin(b)*cos(c) + a* sin(c)*cos(b))**d, 4), (a*cos(b+c)**d, (a*cos(b)*cos(c) - a* sin(c)*sin(b))**d, 4), #(a*tan(b + c)**d, (a*(tan(b) + tan(c))/(1 - tan(c)*tan(b)))**d), (a*cos(2*b)**c, (1 - 2*a*sin(b)**2)**c, 3), (a*sin(2*b)**c, (2*a*sin(b)*cos(b))**c, 3) ) elif expr.is_Add: expr = expr.n() if expr.has(sin,cos) and not expr.has(tan): for pattern,result,n in matchers: ret = S.Zero res = None if expr.is_Add: for term in expr.args: res = term.match(pattern) if res is not None: if len(res) == n and (0 not in res.values()): b # if pattern == (matchers[2][0] or matchers[3,0]) and res[b].is_Mul: # ret += term /b ret += result.subs(res).expand() else: ret += term if res is None: ret += term expr = ret.n() else: break return expr in trigsimp_recursive simplify.py The code is not yet completed...i am presetly working on Rule list 2 TR 10-TR 4-TR3 -''TR 11''-TR5. The problem is (bolded in the code) if the expr contains sin(x).cos(x) etc which were expanded in TR10 ... now using the TR 11 for expr.args its converting sin(x),cos(x) into half angle arguements which is not required and aslo converting cos(2x) in terms of x which is required.What can a solution so that it understands that there is a double angle and converts only that. Is there any sympy function that analyses the arg..ie if there is an expression sin(x) + sin(y) + sin(x/2) then it should return all the symbols in the expr as a tuple (x,y,x/2)..so that it can understand there is a double angle and it can covert only that. or please suggest me some other matcher which evaluates the expansion of only double angle.. -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: Trigonometic Simplification
Thank you.Will go for it. On Tue, Apr 3, 2012 at 6:45 AM, Aleksandar Makelov amake...@college.harvard.edu wrote: Maybe something like atoms(): http://docs.sympy.org/dev/modules/core.html#sympy.core.basic.Basic.atoms is going to help On Apr 2, 8:47 pm, Manoj babu manoj.babu2...@gmail.com wrote: Hi This is Manoj doing my Btech 3rd year at IIT Kharagpur.I am working on trigonometric simplication by fu..http://rfdz.ph-noe.ac.at/ fileadmin/Mathematik_Uploads/ACDCA/DESTIME2006/DES_contribs/Fu/ simplification.pdf i have samll query this is the code i have written matchers = ( (a*sin(b+c)**d, (a*sin(b)*cos(c) + a* sin(c)*cos(b))**d, 4), (a*cos(b+c)**d, (a*cos(b)*cos(c) - a* sin(c)*sin(b))**d, 4), #(a*tan(b + c)**d, (a*(tan(b) + tan(c))/(1 - tan(c)*tan(b)))**d), (a*cos(2*b)**c, (1 - 2*a*sin(b)**2)**c, 3), (a*sin(2*b)**c, (2*a*sin(b)*cos(b))**c, 3) ) elif expr.is_Add: expr = expr.n() if expr.has(sin,cos) and not expr.has(tan): for pattern,result,n in matchers: ret = S.Zero res = None if expr.is_Add: for term in expr.args: res = term.match(pattern) if res is not None: if len(res) == n and (0 not in res.values()): b # if pattern == (matchers[2][0] or matchers[3,0]) and res[b].is_Mul: # ret += term /b ret += result.subs(res).expand() else: ret += term if res is None: ret += term expr = ret.n() else: break return expr in trigsimp_recursive simplify.py The code is not yet completed...i am presetly working on Rule list 2 TR 10-TR 4-TR3 -''TR 11''-TR5. The problem is (bolded in the code) if the expr contains sin(x).cos(x) etc which were expanded in TR10 ... now using the TR 11 for expr.args its converting sin(x),cos(x) into half angle arguements which is not required and aslo converting cos(2x) in terms of x which is required.What can a solution so that it understands that there is a double angle and converts only that. Is there any sympy function that analyses the arg..ie if there is an expression sin(x) + sin(y) + sin(x/2) then it should return all the symbols in the expr as a tuple (x,y,x/2)..so that it can understand there is a double angle and it can covert only that. or please suggest me some other matcher which evaluates the expansion of only double angle.. -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSoC 2012 Proposal: Step by Step Manipulation
Hi, Apologies for the delay in responding; I've been having some network issues, so was off the hook for the past few days. Nevertheless, I noted all your comments, and will update my proposal soon. From what I could understand by Ronan's comments, basically, the methodology has to be more clear, especially the UI part. And also noting Alexey's inputs, I'll make the necessary changes. Regards, Ashwini Oruganti -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSOC proposal (add plot functionality to sympy live and ascii plotting)
On Tuesday, April 3, 2012 1:18:00 AM UTC+5:30, Aaron Meurer wrote: I don't get the point of doing it that way. Wouldn't that mean that you always do the arithmetic in mpmath, and then only convert to numpy at the end? That would defeat the purpose of using numpy. Yeah. What I meant is that the representation of the interval will be in mpi. During evaluation of an expression with numpy, we call to_ndarray() on the interval, which will provide us with the numpy array representing the interval. Then we can, by a set of rules evaluate the expression using numpy. Example: r = mpi([5,15]) a = sin(x) eval(a, r) def eval(expr, inter, lib = 'numpy'): parse the expression. range = to_ndarray(inter) apply the rule for sine. get back the interval. Something on these lines. This will allow me to use mpi and still evaluate expressions using numpy. Probably it's better to create a library that is backend agnostic, and plug numpy and mpmath into it (but do it in such a way so that you can still take advantage of the mpi functionality that is already in mpmath). Aaron Meurer On Sat, Mar 31, 2012 at 11:44 PM, Bharath M R catchmrbhar...@gmail.com wrote: @Aaron Stefan I thought about the interval arithmetic implementation and I came up with this. Derive from mpmath interval arithmetic class and implement all the features. Add an `to_ndarray()` function to the class which converts the interval to an numpy array. An `eval(expr, lib = 'numpy') which evaluates and returns the result based on the rules. Is this a good strategy? or should I implement the complete interval arithmetic in sympy separately. -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/_PSpO9E6gNcJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/nKSYOfgU1TMJ. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] GSoC 2012 Proposal: Step by Step Manipulation
And be sure to submit the proposal at google-melange.com. The deadline is very close, and you don't want to miss it. Aaron Meurer On Mon, Apr 2, 2012 at 9:37 PM, Ashwini Oruganti ashwini.oruga...@gmail.com wrote: Hi, Apologies for the delay in responding; I've been having some network issues, so was off the hook for the past few days. Nevertheless, I noted all your comments, and will update my proposal soon. From what I could understand by Ronan's comments, basically, the methodology has to be more clear, especially the UI part. And also noting Alexey's inputs, I'll make the necessary changes. Regards, Ashwini Oruganti -- 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 sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Re: [sympy] Re: Improvement and bug fixing work for SymPy Bot
On Mon, Apr 2, 2012 at 9:53 AM, Marchael march...@kb.csu.ru wrote: After reading this discussion about improvements of SymPy bot https://groups.google.com/forum/#!topic/sympy/0u8coqHunkc/discussion I get some new ideas for my project: Priorities based on issue labels - hight and critical first. Actually, web application could extract labels from related issue(if it exists of course) count of comments - sorting pulls by count of comments and review most popular pulls first Pulls with issues ranked as high or critical will have greater priority than pulls with many comments. We also should split up and prioritize the various testing configurations. For example, if only Python 2 tests have been run, then Python 3 tests should be prioritized. We could also go for even more fancy things as well. SymPy bot will be able to run tests on different versions of Python(user could add full path to interpreter to config) Web application will waits some time before moving new pull request to queue(about 30 mins) If web application gives more than one commits for this pull, then review only latest from them, that will prevent spam Modified since\Not modified, SymPy bot will gives last time when it ran tests to web application, and it'll answer Not modified if nothing new happens since that time or pulls info if happend. Not sure about that idea, but in some cases we could ignore some tests which unrelated to current changes, what I mean: If we're looking on SymPy code tree then we'll see that code has hierarchy. So, if we make changes in one of core modules then these changes will affect on most part of other code which depends from that module. But if we make changes in some final functions which lie much deeper in code hierarchy, then in most cases changes in them will not affect on other functions, which located in other modules and not depended from them Weak place of this idea is how do we know about other modules/classes/functions which using changed code? We could use searching in source code to know that, but is that really good idea? If what you're suggesting is to only run the tests on the module that was changed by the pull request, then I would recommend against that. SymPy-Bot makes it easy to run the full test suite, and this is the only way we can be assured that the code changes do not break anything. The parts of SymPy are very interlinked, and changing one thing can lead to unexpected changes elsewhere. So we should always run the full test suite. What we should do is have SymPy-Bot run tests on master, and not report test failures that exist in master. Well, actually, they should be reported somewhere, but not on unrelated pull requests. Aaron Meurer Sometimes pull request just hangs for long time(e.g. more then one mounth), so web application doesn't include that pull in queue Silent running, bot will not comment about test result on github, Usefull when we want just make SymPy bot could exchange data with web application in theese ways(some examlpes in pseudo-python-code): 1. Using pickle for storing dict like On web application: import pickle pull_info = {pull_number: (date, commit_hash, [label1,label2], comments_count)} pickled_info = pickle.dumps(pull_info) # and gives that to sympy bot as application/octet-stream 2. Using class class IncomingPull(object): def __main__(self, pull_number, date, commit_hash, labels, comment_count); self.pull_number = pull_number on web-server side: import pickle pulls_for_review = [pull_data1,pull_data2,...] pulls_for_bot = [] for pull in pulls_for_review: pulls_for_bot.append(IncomingPull(value1,value2,...)) picklestring = pickle.dumps(pulls_for_bot) -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/sZSsjpXA3-4J. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. 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 sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.