Re: [sympy] Recommendations for creating symbols

2015-04-02 Thread Joachim Durchholz
Am 30.03.2015 um 21:33 schrieb Aaron Meurer: I would definitely test the different alternatives for sympy.abc to see what's faster. I just ran bin/test with `a = Symbol('a')` etc. Runtime went from 56:29 to 56:37, i.e. below the noise threshold. That was with Python 2.7. I guess the Pyton

[sympy] Re: Power simplification

2015-04-02 Thread Francesco Bonazzi
In [1]: var('x y', positive=True) Out[1]: (x, y) In [2]: ex = x**2 * y**4 In [3]: w = Wild('w') In [4]: mt = ex.match(w**2) In [5]: mt Out[5]: ⎧ 2⎫ ⎨w: x⋅y ⎬ ⎩ ⎭ In [6]: Pow(mt[w], 2, evaluate=False) Out[6]: 2 ⎛ 2⎞ ⎝x⋅y ⎠ On Tuesday, March 31, 2015 at 4:50:59 PM

[sympy] Re: Question about the management of the pull requests

2015-04-02 Thread Francesco Bonazzi
On Wednesday, April 1, 2015 at 11:35:40 PM UTC+2, Christophe Bal wrote: I'm learning git [ ... ] I suggest to use PyCharm, it's an excellent Python development environment, plus it has a very comfortable integration with github:

[sympy] Re: Smart subs

2015-04-02 Thread Francesco Bonazzi
In [1]: ex = sqrt(x+1)+x+3 In [2]: ex.subs(x, solve(y-sqrt(x+1), x)[0]) Out[2]: 2 ╱ 2 y + ╲╱ y + 2 If *y* is declared to be positive, you get the right expression. On Wednesday, April 1, 2015 at 7:01:29 PM UTC+2, Paul Royik wrote: Is there a function that

Re: [sympy] Re: Question about the management of the pull requests

2015-04-02 Thread Christophe Bal
Thanks for the answers. Indeed I was hoping that git can manage multi pull requests. If it is not case, Il will build a python scripts such to play with the git --stat outputs. Now that I know a little git, I will try to participate as soon as possible. Thanks for pycharm but I prefer to use

[sympy] Re: solve traceback

2015-04-02 Thread G B
It looks like the root cause of this is that the Function doesn't have all the assumptions set. I don't fully understand how assumptions are wired in, and I know the assumptions system is in flux, but it looks like None is a flag for exists but not set. Would it be better to have FactKB

Re: [sympy] Re: solve traceback

2015-04-02 Thread Sudhanshu Mishra
Hi, This seems interesting and might be a bug. Could you please create an issue here https://github.com/sympy/sympy/issues with your *equations* and traceback. Sudhanshu Mishra On Fri, Apr 3, 2015 at 3:07 AM, G B g.c.b.at.w...@gmail.com wrote: It looks like the root cause of this is that the

[sympy] Re: Smart subs

2015-04-02 Thread Paul Royik
Is there any way subs can substitute 3x+3y into 3t without factoring first? I enter 3*(x+y) but sympy automatically converts it into 3x+3y and subs doesn't work. On Thursday, April 2, 2015 at 12:15:02 PM UTC+3, Francesco Bonazzi wrote: In [1]: ex = sqrt(x+1)+x+3 In [2]: ex.subs(x,

[sympy] Re: Smart subs

2015-04-02 Thread Francesco Bonazzi
Maybe you should read the documentation. Have a look at unevaluated expressions. -- 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 sympy+unsubscr...@googlegroups.com. To

Re: [sympy] Power simplification

2015-04-02 Thread Aaron Meurer
I guess we need a reverse of powdenest (like powcollect or something). Aaron Meurer On Tue, Mar 31, 2015 at 9:50 AM, Paul Royik distantjob...@gmail.com wrote: Is there any way I can rewrite x^2y^4 to (xy^2)^2 or x^3(x+y)^6 to (x(x+y)^2)^3 , i.e. combine base? Exponents are guaranteed to

[sympy] Re: Smart subs

2015-04-02 Thread Paul Royik
Your aaproach fails when we want to substitute sqrt(xy+1) for u. What to solve here? On Thursday, April 2, 2015 at 4:17:54 PM UTC+3, Paul Royik wrote: Another smart solution. Thanks a ton. Maybe you can tell me why the following code doesn't work: https://github.com/sympy/sympy/issues/9233

Re: [sympy] Re: Question about the management of the pull requests

2015-04-02 Thread Aaron Meurer
You can also add something to your ./git/config to always fetch these https://gist.github.com/piscisaureus/3342247 I recommend using the hub command for better integration with git and github. Aaron Meurer On Thu, Apr 2, 2015 at 10:19 AM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi

Re: [sympy] Re: Question about the management of the pull requests

2015-04-02 Thread Ondřej Čertík
Hi Christophe, On Thu, Apr 2, 2015 at 8:38 AM, Joachim Durchholz j...@durchholz.org wrote: Am 02.04.2015 um 11:30 schrieb Christophe Bal: Thanks for the answers. Indeed I was hoping that git can manage multi pull requests. If it is not case, Il will build a python scripts such to play with

[sympy] Re: Smart subs

2015-04-02 Thread Paul Royik
Another smart solution. Thanks a ton. Maybe you can tell me why the following code doesn't work: https://github.com/sympy/sympy/issues/9233 On Thursday, April 2, 2015 at 12:15:02 PM UTC+3, Francesco Bonazzi wrote: In [1]: ex = sqrt(x+1)+x+3 In [2]: ex.subs(x, solve(y-sqrt(x+1), x)[0])

[sympy] Re: Power simplification

2015-04-02 Thread Paul Royik
Smart solution. Thank you. On Thursday, April 2, 2015 at 12:10:38 PM UTC+3, Francesco Bonazzi wrote: In [1]: var('x y', positive=True) Out[1]: (x, y) In [2]: ex = x**2 * y**4 In [3]: w = Wild('w') In [4]: mt = ex.match(w**2) In [5]: mt Out[5]: ⎧ 2⎫ ⎨w: x⋅y ⎬ ⎩ ⎭ In

Re: [sympy] Re: Question about the management of the pull requests

2015-04-02 Thread Joachim Durchholz
Am 02.04.2015 um 11:30 schrieb Christophe Bal: Thanks for the answers. Indeed I was hoping that git can manage multi pull requests. If it is not case, Il will build a python scripts such to play with the git --stat outputs. Wait until you have seen some actual merge conflicts :-) It's not

Re: [sympy] Recommendations for creating symbols

2015-04-02 Thread James Crist
Symbols are cached by name and assumptions, and like everything else in SymPy, are immutable. Thus: In [1]: a = symbols('a') In [2]: a2 = symbols('a', positive=True) In [3]: a is a2 Out[3]: False In [4]: hash(a) == hash(a2) Out[4]: False So no, you should have no problems with assumptions.

Re: [sympy] Recommendations for creating symbols

2015-04-02 Thread James Crist
Performance: Using symbols() in all contexts might have performance ramifications, creating new Symbol() objects means more memory pressure than reusing precreated symbols from sympy.abc (which happen 521 times in SymPy itself, hopefully just in test code). We cache symbol creation,

Re: [sympy] Recommendations for creating symbols

2015-04-02 Thread Joachim Durchholz
Am 02.04.2015 um 18:46 schrieb James Crist: Performance: Using symbols() in all contexts might have performance ramifications, creating new Symbol() objects means more memory pressure than reusing precreated symbols from sympy.abc (which happen 521 times in SymPy itself, hopefully just in