Re: [sympy] Re: REMINDER: Google Summer of Code 2015

2015-03-27 Thread Abinash Meher
Hi Raniere, I have a proposal regarding CSymPy ruby wrappers. What are the orgs that I can apply to? *Regards,* *Abinash Meher* On Thu, Mar 26, 2015 at 7:04 PM, Raniere Silva wrote: > Hi Shivam, > > > I'm applying this year for GSoC and my proposal > > < > https://github.com/sympy/sympy/wiki/G

Re: [sympy] Re: REMINDER: Google Summer of Code 2015

2015-03-27 Thread Jason Moore
Abinash, That project needs to be specifically sent to SciRuby. You can also send it to PSF and NumFOCUS, but SciRuby is the main one. Jason moorepants.info +01 530-601-9791 On Fri, Mar 27, 2015 at 12:14 AM, Abinash Meher < abinashdakshana...@gmail.com> wrote: > Hi Raniere, > > I have a propos

Re: [sympy] Re: 24 hours left for GSoC proposals

2015-03-27 Thread Sumith 1896
Thanks for the confirmation Jason Cheers Sumith On Fri, Mar 27, 2015 at 4:32 AM, Jason Moore wrote: > Sumith, > > I see yours under PSF and NumFOCUS. > > > Jason > moorepants.info > +01 530-601-9791 > > On Thu, Mar 26, 2015 at 3:59 PM, Sumith 1896 wrote: > >> Hello, >> Even I would like a co

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Paul Royik
Both fraction and as_numer_denom return (2x+2, sin(x)+1) for expression 2(x+1)/(sin(x)+1), i.e. they rewrite numerator and denominator. I suggest simple fix for fraction: substitute last line return Mul(*numer), Mul(*denom) with return Mul(*numer, evaluate=False), Mul(*denom, evaluate=False) For

Re: [sympy] Re: 24 hours left for GSoC proposals

2015-03-27 Thread Luv Agarwal
Hi Jason, thanks for the confirmation Regards Luv Agarwal On Friday, March 27, 2015 at 4:32:04 AM UTC+5:30, Jason Moore wrote: > > Luv, I see your applications in the PSF and NumFOCUS. We do not have > access to SAGE (at least I don't) so you'll have to ask SAGE. > > > Jason > moorepants.info > +

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Chris Smith
That seems reasonable since fraction is allowing the expr to rewrite: >>> 2*e 2*(x + 1)/(x - 1) >>> fraction(_) (2*x + 2, x - 1) On Friday, March 27, 2015 at 4:28:28 AM UTC-5, Paul Royik wrote: > > Both fraction and as_numer_denom return (2x+2, sin(x)+1) for expression > 2(x+1)/(sin(x)+1), i.e.

Re: [sympy] Re: REMINDER: Google Summer of Code 2015

2015-03-27 Thread Ondřej Čertík
On Fri, Mar 27, 2015 at 1:25 AM, Jason Moore wrote: > Abinash, > > That project needs to be specifically sent to SciRuby. You can also send it > to PSF and NumFOCUS, but SciRuby is the main one. That's right. Ondrej -- You received this message because you are subscribed to the Google Groups

Re: [sympy] Re: REMINDER: Google Summer of Code 2015

2015-03-27 Thread Ondřej Čertík
On Fri, Mar 27, 2015 at 9:06 AM, Ondřej Čertík wrote: > On Fri, Mar 27, 2015 at 1:25 AM, Jason Moore wrote: >> Abinash, >> >> That project needs to be specifically sent to SciRuby. You can also send it >> to PSF and NumFOCUS, but SciRuby is the main one. > > That's right. I think you can probabl

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Aaron Meurer
Isn't this just because the Mul evaluates itself. I don't think it's actually fraction() that is rewriting things. Aaron Meurer On Fri, Mar 27, 2015 at 9:31 AM, Chris Smith wrote: > That seems reasonable since fraction is allowing the expr to rewrite: > 2*e > 2*(x + 1)/(x - 1) fraction

[sympy] Re: 24 hours left for GSoC proposals

2015-03-27 Thread Sartaj Singh
I have submitted my proposal to PSF and NumFocus under the title "Sympy - Improving the series package and limits". Sartaj Singh -- 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

Re: [sympy] GSoC 15: Improving Assumptions

2015-03-27 Thread Sudhanshu Mishra
Aaron, I've updated(Added more description about execution and added timeline) my proposal on wiki as well as on melange. Please have a look and let me know if it looks good. Sudhanshu Mishra. On Thu, Mar 2

Re: [sympy] GSoC 15: Improving Assumptions

2015-03-27 Thread Aaron Meurer
I won't have a chance to look at this until after the deadline. Aaron Meurer On Fri, Mar 27, 2015 at 10:39 AM, Sudhanshu Mishra wrote: > Aaron, > > I've updated(Added more description about execution and added timeline) my > proposal on wiki as well as on melange. Please have a look and let me k

Re: [sympy] GSoC 15: Improving Assumptions

2015-03-27 Thread Sudhanshu Mishra
Ok no problem. We can discuss that later over here if you have any question for me. Sudhanshu Mishra On Fri, Mar 27, 2015 at 9:22 PM, Aaron Meurer wrote: > I won't have a chance to look at this until after the deadline. > > Aaron Meurer > > On Fri, Mar 27, 2015 at 10:39 AM, Sudhanshu Mishra >

[sympy] rsolve example symbol

2015-03-27 Thread Raymond Rogers
I am attempting to rsolve a recursion and am having a problem. Doctoring up the first example the live window follows. Please note that I changed (n**2 + 3*n - 2) to (n**2 + 3*n - k) and then no output results. Is this because it won't handle parameters or am I supposed to do things differentl

[sympy] expanding powers of cos()

2015-03-27 Thread Jeremy Holleman
Hi, I'm relatively new to SymPy, and enjoying it so far. I'm trying to analyze the harmonics that result when a sinusoid goes through a non-linear system. I have an expression that includes powers of a cos() and I want to expand it using the sum/difference angle identities. So I want In [5

[sympy] Re: expanding powers of cos()

2015-03-27 Thread Paul Royik
Hello, Jeremy. Try this: from sympy.simplify.fu import TR7 TR7(cos(x)**2) On Friday, March 27, 2015 at 8:36:43 PM UTC+2, Jeremy Holleman wrote: > > Hi, > > I'm relatively new to SymPy, and enjoying it so far. I'm trying to > analyze the harmonics that result when a sinusoid goes through a no

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Paul Royik
This dosn't seem reasonable. Expanding goes on the line Mul(*numer). Mul(*numer, evaluate=False) fixes things. On Friday, March 27, 2015 at 4:31:58 PM UTC+2, Chris Smith wrote: > > That seems reasonable since fraction is allowing the expr to rewrite: > > >>> 2*e > 2*(x + 1)/(x - 1) > >>> fraction

[sympy] Restore Poly from dict

2015-03-27 Thread Paul Royik
Suppose I have following polynomial: poly= Poly(6*x**4*y**5 + 3*x*y**2,y,x) It's dictionary is poly.as_dict() # {(5, 4): 6, (2, 1): 3} How can I restore poly from dict? How do I know that (5, 4) - > (y, x) ? poly.free_symbols is set, so it is unordered. Is there any way to fetch that from Poly?

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Aaron Meurer
We need to just remove this automatic distribution of numbers. Until we do that, we will continue to have confusing behavior like this. See https://github.com/sympy/sympy/issues/4596 for more information. Aaron Meurer On Fri, Mar 27, 2015 at 1:47 PM, Paul Royik wrote: > This dosn't seem reasonab

Re: [sympy] Restore Poly from dict

2015-03-27 Thread Aaron Meurer
It looks like Poly.from_dict will do it: In [6]: p = Poly(6*x**4*y**5 + 3*x*y**2,y,x) In [7]: p.as_dict() Out[7]: {(2, 1): 3, (5, 4): 6} In [8]: p.from_dict(p.as_dict(), y, x) Out[8]: Poly(6*y**5*x**4 + 3*y**2*x, y, x, domain='ZZ') The order of the generators is the same as the order in the Pol

[sympy] Re: expanding powers of cos()

2015-03-27 Thread Jeremy Holleman
Thanks! That did exactly what I want for cos**2. I would also like to reduce the power on higher order terms. I tried TR7() on cos(x)**3 and cos(x)**4 and it did not make any changes. From quick glance here (https://github.com/sympy/sympy/blob/master/sympy/simplify/fu.py), TR7 seems like th

[sympy] Re: expanding powers of cos()

2015-03-27 Thread Jeremy Holleman
Update - Some combination of TR7, TR8, and expand() seems to work for powers that I've tried. For example: In [5]: TR8(expand(TR8(cos(x)**7))) > Out[5]: 35*cos(x)/64 + 21*cos(3*x)/64 + 7*cos(5*x)/64 + cos(7*x)/64 But it's not clear to me how I would do that in a programmatic way. Jeremy O

Re: [sympy] Restore Poly from dict

2015-03-27 Thread Paul Royik
Thank you. On Friday, March 27, 2015 at 9:55:21 PM UTC+2, Aaron Meurer wrote: > > It looks like Poly.from_dict will do it: > > In [6]: p = Poly(6*x**4*y**5 + 3*x*y**2,y,x) > > In [7]: p.as_dict() > Out[7]: {(2, 1): 3, (5, 4): 6} > > In [8]: p.from_dict(p.as_dict(), y, x) > Out[8]: Poly(6*y**5

Re: [sympy] Difference between fraction and as_numer_denom

2015-03-27 Thread Paul Royik
I see now. On Friday, March 27, 2015 at 9:51:52 PM UTC+2, Aaron Meurer wrote: > > We need to just remove this automatic distribution of numbers. Until > we do that, we will continue to have confusing behavior like this. See > https://github.com/sympy/sympy/issues/4596 for more information. > >

[sympy] Re: expanding powers of cos()

2015-03-27 Thread Paul Royik
What do you mean "how I would do that in a programmatic way"? On Friday, March 27, 2015 at 11:33:27 PM UTC+2, Jeremy Holleman wrote: > > Update - Some combination of TR7, TR8, and expand() seems to work for > powers that I've tried. For example: > > In [5]: TR8(expand(TR8(cos(x)**7))) >> Out[5]

Re: [sympy] meijerint.py: Sorting in _mul_as_two_parts, _rewrite2

2015-03-27 Thread Joachim Durchholz
Am 24.03.2015 um 22:29 schrieb Aaron Meurer: On Tue, Mar 24, 2015 at 4:36 AM, Joachim Durchholz wrote: Is Meijer heuristic? In that case, I think variation due to changed sort order would be expected. Yes, it uses a lot of pattern matching, which is heuristic in nature. I have tracked down

Re: [sympy] meijerint.py: Sorting in _mul_as_two_parts, _rewrite2

2015-03-27 Thread Aaron Meurer
On Fri, Mar 27, 2015 at 5:26 PM, Joachim Durchholz wrote: > Am 24.03.2015 um 22:29 schrieb Aaron Meurer: >> >> On Tue, Mar 24, 2015 at 4:36 AM, Joachim Durchholz >> wrote: >>> >>> Is Meijer heuristic? In that case, I think variation due to changed sort >>> order would be expected. >> >> >> Yes, i

[sympy] Re: expanding powers of cos()

2015-03-27 Thread Jeremy Holleman
I just mean that if I'm trying to write a script and I want to reduce all of the powers of cos or sin, I'm not sure how I would code that, because I can't tell if there's a pattern of which calls need to be made in which order to reduce an arbitrary polynomial of trig functions. For my present

Re: [sympy] Re: expanding powers of cos()

2015-03-27 Thread Aaron Meurer
I would take a look at the fu paper for more references on what these rules are supposed to be, but I suspect that this is a bug. Aaron Meurer On Fri, Mar 27, 2015 at 7:01 PM, Jeremy Holleman wrote: > I just mean that if I'm trying to write a script and I want to reduce all of > the powers of co

Re: [sympy] Re: expanding powers of cos()

2015-03-27 Thread Jeremy Holleman
I'll do that. Thanks to both of you for the help! On Friday, March 27, 2015 at 8:30:03 PM UTC-4, Aaron Meurer wrote: > > I would take a look at the fu paper for more references on what these > rules are supposed to be, but I suspect that this is a bug. > > Aaron Meurer > > On Fri, Mar 27, 20

Re: [sympy] Integrate over Union of Interval's

2015-03-27 Thread Matthew Rocklin
> Matthew... what do you think of the union of intervals as an alternative to the usual ranges in integrate/Integral? Seems like a decent plan. I haven't been actively working on stats in a while so I don't have strong opinions here. On Thu, Mar 26, 2015 at 6:50 PM, Aaron Meurer wrote: > I t