Re:Re: [sympy] TEX commands as input in SymPy

2014-10-24 Thread redstone-cold
Is there any way to simplify (-12*x - 1)*(2*x3 + 3*x2 - 2*x - 5) + (-6*x2 - x - 7)*(6*x2 + 6*x - 2) ? I want to get the final result ,not an intermediate one. At 2014-10-17 22:27:44, "Chris Smith" wrote: The parser was fixed as indicated at http://stackoverflow.com/questions/26249993/6x2-

[sympy] parse_expr bug with splitting symbols and undefined function

2014-10-24 Thread Duane Nykamp
The following throws an error In [27]: f=Function('f') In [28]: parse_expr('af(t)', local_dict={'f': f }, transformations=(auto_symbol, auto_number, split_symbols, implicit_multiplication)) --- TypeError

[sympy] Targeting specific subexpression for transformations

2014-10-24 Thread Francesco Bonazzi
Consider this use case In [97]: expr = 1/(1-x) + 1/(1+x) In [98]: e2 = Integral(expr, x) In [99]: e2 Out[99]: ⌠ ⎮ ⎛ 1 1 ⎞ ⎮ ⎜─ + ──⎟ dx ⎮ ⎝x + 1 -x + 1⎠ ⌡ Suppose now I want to act on the expression inside the integral by applyi

[sympy] LaTeX expresentation as input in SymPy

2014-10-24 Thread redstone-cold
I have found this function latex(expr, **settings): can Convert the given expression to LaTeX representation,but is there any function can take LaTeX expresentation so that it can be used in SymPy ? i.e. is there any function can take | \dfrac{2x+2}{2x^3-3x^2+3x+3} | as input in SymPy ? -- Yo

[sympy] Refine away Piecewise using assumptions.

2014-10-24 Thread Björn Dahlgren
Consider the following short example: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/bjodah/720617780e83d7c35797/raw/c297ecf76a8e26a711b7c7868839f2dfb221bc10/gistfile1.txt refine with Q.is_true(...) works ok for refining away Piecewise from a solution (although it's a bit picky, e.g

Re: [sympy] Targeting specific subexpression for transformations

2014-10-24 Thread Mateusz Paprocki
Hi, On 24 October 2014 15:16, Francesco Bonazzi wrote: > Consider this use case > > In [97]: expr = 1/(1-x) + 1/(1+x) > > In [98]: e2 = Integral(expr, x) > > In [99]: e2 > Out[99]: > ⌠ > ⎮ ⎛ 1 1 ⎞ > ⎮ ⎜─ + ──⎟ dx > ⎮ ⎝x + 1 -x + 1⎠ > ⌡ > > > Suppose now I want to act on the exp

Re: [sympy] Interest in adding timeout argument to potentially long running calls (potential implementation included)?

2014-10-24 Thread Joachim Durchholz
Am 23.10.2014 um 22:06 schrieb James Crist: What's "composable" in this context? Easy to write without intruding too much into the actual function. OK That would not affect SymPy itself, as it is not multithreaded. No, but it would affect anything that tried to run sympy functions th

Re: Re: [sympy] TEX commands as input in SymPy

2014-10-24 Thread Aaron Meurer
Use simplify() Aaron Meurer On Fri, Oct 24, 2014 at 6:54 AM, redstone-cold wrote: > > Is there any way to simplify (-12*x - 1)*(2*x3 + 3*x2 - 2*x - 5) + (-6*x2 - > x - 7)*(6*x2 + 6*x - 2) ? I want to get the final result ,not an > intermediate one. > > > > > > At 2014-10-17 22:27:44, "Chris Smit

Re: [sympy] parse_expr bug with splitting symbols and undefined function

2014-10-24 Thread Aaron Meurer
Go ahead and open a pull request with this change, and we can review it, and see if it breaks any tests, and so on. Aaron Meurer On Fri, Oct 24, 2014 at 7:55 AM, Duane Nykamp wrote: > The following throws an error > > In [27]: f=Function('f') > > In [28]: parse_expr('af(t)', local_dict={'f': f }

Re: [sympy] LaTeX expresentation as input in SymPy

2014-10-24 Thread Aaron Meurer
We don't have it but we do want it. See https://github.com/sympy/sympy/issues/5418. Note that parse_expr can already handle the basic stuff (like implicit multiplication). Aaron Meurer On Fri, Oct 24, 2014 at 8:23 AM, redstone-cold wrote: > I have found this function > latex(expr, **settings):

[sympy] Starting to work on issue

2014-10-24 Thread Adhitya Kamakshidasan
I would like to work upon this issue which has been reported. https://github.com/sympy/sympy/issues/7570 Would someone please tell me, how to get started with this? Where should I start to look for this issue? Highly eager to get this going. Sorry, to be asking so trivial questions. Regard

Re: [sympy] Refine away Piecewise using assumptions.

2014-10-24 Thread Aaron Meurer
On Fri, Oct 24, 2014 at 9:45 AM, Björn Dahlgren wrote: > Consider the following short example: > > http://nbviewer.ipython.org/urls/gist.githubusercontent.com/bjodah/720617780e83d7c35797/raw/c297ecf76a8e26a711b7c7868839f2dfb221bc10/gistfile1.txt > > refine with Q.is_true(...) works ok for refining

Re: [sympy] parse_expr bug with splitting symbols and undefined function

2014-10-24 Thread Duane Nykamp
OK. I added a pull request: https://github.com/sympy/sympy/pull/8307 On Friday, October 24, 2014 4:24:41 PM UTC-5, Aaron Meurer wrote: > > Go ahead and open a pull request with this change, and we can review > it, and see if it breaks any tests, and so on. > > Aaron Meurer > > On Fri, Oct 24,

[sympy] Re: Interest in adding timeout argument to potentially long running calls (potential implementation included)?

2014-10-24 Thread James Crist
The first approach was hackish (actually both are, but the decorator way is *significantly* better). And I agree, I'm still not sure this a problem worth solving. Just food for conversation. I posted some timings on the decorator PR https://github.com/sympy/sympy/pull/8297 The core tests ran ab

Re: [sympy] Interest in adding timeout argument to potentially long running calls (potential implementation included)?

2014-10-24 Thread Joachim Durchholz
I have thought a bit more, and it *would* open up using SymPy inside other applications (GUIs, as part of an array of problem solvers, whatever). Can't name any concrete killer app, but making a piece of software more generally useful and seeing what people make of it is always a good idea. I