Re: [sympy] New assumptions prototype

2013-10-06 Thread Christian Muise
> Proof of concept or not, it's already used by the new assumptions system > to detect inconsistencies. If you have any suggestions on how to improve > the algorithm in pure Python, we'd love to hear them. > There's always more that can be done ;). I'd say the next obvious step would be to imple

Re: [sympy] SymPy and IPython

2013-10-06 Thread Sergey Kirpichev
On Wed, Sep 4, 2013 at 7:53 PM, Aaron Meurer wrote: > I think it would be better to implement the new IPython transformers. > Then, people could add a very short IPython profile and start with > something like ipython --profile sympy. This already has to use IPython, it > might as well use the

Re: [sympy] New assumptions prototype

2013-10-06 Thread Aaron Meurer
On Sun, Oct 6, 2013 at 5:05 AM, Christian Muise wrote: > >> Proof of concept or not, it's already used by the new assumptions system >> to detect inconsistencies. If you have any suggestions on how to improve the >> algorithm in pure Python, we'd love to hear them. > > > There's always more that

Re: [sympy] SymPy and IPython

2013-10-06 Thread Aaron Meurer
I don't think so, but there was some discussion on this at https://github.com/ipython/ipython/pull/2301. That pull request implemented the basic API that we will want to use in IPython. There is also a guide to AST at http://greentreesnakes.readthedocs.org/en/latest/. All the relevant code is in s

[sympy] Porting CSymPy back to Python

2013-10-06 Thread Ronan Lamy
I've been wondering how much of the speed of CSymPy compared to SymPy is due to the language (C++ vs Python) and how much is due to more efficient algorithms. So I've created a simple proof of concept [https://github.com/rlamy/pycsympy] implementing an algorithm similar to what CSymPy uses in p

Re: [sympy] Porting CSymPy back to Python

2013-10-06 Thread Aaron Meurer
You can get similar speeds in regular SymPy. For me In [59]: R, x, y, z, w = ring("x,y,z,w", ZZ, lex) In [60]: %timeit (x + y + z + w)**60 1 loops, best of 3: 414 ms per loop in pycsympy the fastest time was 405 ms. I wasn't able to compile CSymPy because of /Users/aaronmeurer/Documents/python

[sympy] Confidence intervals in sympy.stats

2013-10-06 Thread Buck Shlegeris
I have the following code, using the statistics module. It answers questions like "If there's a 20% chance that my random variable is within 10 of the mean, what is the standard deviation?" with the call getStdDev(10,20). def getStdDev(distance,confidence): x = Normal(0,1) confidenceDis

Re: [sympy] Confidence intervals in sympy.stats

2013-10-06 Thread Matthew Rocklin
This fails in solve In [1]: from sympy.stats import * In [2]: mu = Symbol('mu', real=True, bounded=True) In [3]: sigma = Symbol('sigma', positive=True) In [4]: X = Normal('X', mu, sigma) In [5]: simplify(2 * P(X - mu < 10)) Out[5]: ⎛___⎞ ⎜5⋅╲╱ 2 ⎟ erf⎜───⎟ + 1 ⎝ σ ⎠ In [6

Re: [sympy] Porting CSymPy back to Python

2013-10-06 Thread Ondřej Čertík
Hi Ronan, On Sun, Oct 6, 2013 at 8:56 PM, Ronan Lamy wrote: > I've been wondering how much of the speed of CSymPy compared to SymPy is due > to the language (C++ vs Python) and how much is due to more efficient > algorithms. So I've created a simple proof of concept > [https://github.com/rlamy/py

Re: [sympy] Porting CSymPy back to Python

2013-10-06 Thread Aaron Meurer
> On Oct 6, 2013, at 11:18 PM, "Ondřej Čertík" wrote: > > Hi Ronan, > >> On Sun, Oct 6, 2013 at 8:56 PM, Ronan Lamy wrote: >> I've been wondering how much of the speed of CSymPy compared to SymPy is due >> to the language (C++ vs Python) and how much is due to more efficient >> algorithms. So I'v

Re: [sympy] Confidence intervals in sympy.stats

2013-10-06 Thread Aaron Meurer
On Oct 6, 2013, at 10:13 PM, Matthew Rocklin wrote: This fails in solve In [1]: from sympy.stats import * In [2]: mu = Symbol('mu', real=True, bounded=True) In [3]: sigma = Symbol('sigma', positive=True) In [4]: X = Normal('X', mu, sigma) In [5]: simplify(2 * P(X - mu < 10)) Out[5]: ⎛