[PATCH 0/6] Refine module

2009-08-10 Thread Fabian Pedregosa
In the following series of patches, I implement a refine() method that simplifies expressions based on its assumptions. I also deleted some code from the old assumption system. All deleted code (and tests) are now in sympy/queries or in sympy/refine/ You can pull from my branch refine: git pul

Re: [PATCH 0/6] Refine module

2009-08-10 Thread Ondrej Certik
On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa wrote: > > In the following series of patches, I implement a refine() method that > simplifies > expressions based on its assumptions. > > I also deleted some code from the old assumption system. All deleted code > (and tests) > are now in sympy/

Re: [PATCH 0/6] Refine module

2009-08-10 Thread Fabian Pedregosa Izquierdo
Ondrej Certik wrote: > On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa wrote: >> In the following series of patches, I implement a refine() method that >> simplifies >> expressions based on its assumptions. >> >> I also deleted some code from the old assumption system. All deleted code >> (and

Re: [PATCH 0/6] Refine module

2009-08-10 Thread Ondrej Certik
Ubuntu, 64 bits. Ondrej On Mon, Aug 10, 2009 at 6:31 PM, Fabian Pedregosa Izquierdo wrote: > > Ondrej Certik wrote: >> On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa wrote: >>> In the following series of patches, I implement a refine() method that >>> simplifies >>> expressions based on its

Re: [PATCH 0/6] Refine module

2009-08-10 Thread Ondrej Certik
e.g. python2.6. On Mon, Aug 10, 2009 at 8:08 PM, Ondrej Certik wrote: > Ubuntu, 64 bits. > > Ondrej > > On Mon, Aug 10, 2009 at 6:31 PM, Fabian Pedregosa > Izquierdo wrote: >> >> Ondrej Certik wrote: >>> On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa wrote: In the following series of patc

Re: [PATCH 0/6] Refine module

2009-08-10 Thread Ondrej Certik
e.g. python2.6. On Mon, Aug 10, 2009 at 8:08 PM, Ondrej Certik wrote: > Ubuntu, 64 bits. > > Ondrej > > On Mon, Aug 10, 2009 at 6:31 PM, Fabian Pedregosa > Izquierdo wrote: >> >> Ondrej Certik wrote: >>> On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa wrote: In the following series of patc

Re: [PATCH 0/6] Refine module

2009-08-11 Thread Ondrej Certik
This still fails in the latest branch: bin/test sympy/concrete/tests/test_sums_products.py -k test_composite_sums I just sent you a login info to my amd64 box offlist, please debug it. Ondrej On Mon, Aug 10, 2009 at 8:10 PM, Ondrej Certik wrote: > e.g. python2.6. > > On Mon, Aug 10, 2009 at 8

Re: [PATCH 0/6] Refine module

2009-08-11 Thread Vinzent Steinberg
2009/8/11 Ondrej Certik > > On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa > wrote: > > > > In the following series of patches, I implement a refine() method that > simplifies > > expressions based on its assumptions. > > > > I also deleted some code from the old assumption system. All deleted

Re: [PATCH 0/6] Refine module

2009-08-12 Thread Fabian Pedregosa
Ondrej Certik wrote: > This still fails in the latest branch: > > bin/test sympy/concrete/tests/test_sums_products.py -k test_composite_sums > > I just sent you a login info to my amd64 box offlist, please debug it. This can be fixed by: diff --git a/sympy/core/assumptions.py b/sympy/core/ass

Re: [PATCH 0/6] Refine module

2009-08-12 Thread Vinzent Steinberg
2009/8/12 Fabian Pedregosa > > Ondrej Certik wrote: > > This still fails in the latest branch: > > > > bin/test sympy/concrete/tests/test_sums_products.py -k > test_composite_sums > > > > I just sent you a login info to my amd64 box offlist, please debug it. > > > This can be fixed by: > > diff -

Re: [PATCH 0/6] Refine module

2009-08-12 Thread Ondrej Certik
On Wed, Aug 12, 2009 at 8:00 AM, Vinzent Steinberg wrote: > 2009/8/12 Fabian Pedregosa >> >> Ondrej Certik wrote: >> > This still fails in the latest branch: >> > >> > bin/test sympy/concrete/tests/test_sums_products.py -k >> > test_composite_sums >> > >> > I just sent you a login info to my amd6

Re: [PATCH 0/6] Refine module

2009-08-12 Thread Ondrej Certik
On Wed, Aug 12, 2009 at 11:28 AM, Ondrej Certik wrote: > On Wed, Aug 12, 2009 at 8:00 AM, Vinzent > Steinberg wrote: >> 2009/8/12 Fabian Pedregosa >>> >>> Ondrej Certik wrote: >>> > This still fails in the latest branch: >>> > >>> > bin/test sympy/concrete/tests/test_sums_products.py -k >>> > tes

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Fabian Pedregosa
Ondrej Certik wrote: > On Wed, Aug 12, 2009 at 11:28 AM, Ondrej Certik wrote: >> On Wed, Aug 12, 2009 at 8:00 AM, Vinzent >> Steinberg wrote: >>> 2009/8/12 Fabian Pedregosa Ondrej Certik wrote: > This still fails in the latest branch: > > bin/test sympy/concrete/tests/test_sums_pr

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Vinzent Steinberg
Again, a few comments. > args = map(refine, expr.args, [assumptions]*len(expr.args)) I'd use a list comprehension here (faster iirc and imho more readable) something like: args = [refine(a, assumptions) for a in expr.args] The docstrings in refine.py are somewhat inconsistently formatted, but I

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Fabian Pedregosa
Vinzent Steinberg wrote: > Again, a few comments. > > > args = map(refine, expr.args, [assumptions]*len(expr.args)) > > I'd use a list comprehension here (faster iirc and imho more readable) > something like: > > args = [refine(a, assumptions) for a in expr.args] certainly, it also looks mor

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Vinzent Steinberg
I'd prefer """Handler for the absolute value.""" (see PEP 257 [1]) over """handler for the absolute value""" but that's certainly not important. After all, most docstrings in sympy are not conforming to all these conventions. You could still leave the old information (before you made the docstr

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Ondrej Certik
On Thu, Aug 13, 2009 at 7:05 AM, Vinzent Steinberg wrote: > I'd prefer > > """Handler for the absolute value.""" > > (see PEP 257 [1]) over > > """handler for the absolute value""" > > but that's certainly not important. After all, most docstrings in sympy are > not conforming to all these convent

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Fabian Pedregosa
Ondrej Certik wrote: > On Thu, Aug 13, 2009 at 7:05 AM, Vinzent > Steinberg wrote: >> I'd prefer >> >> """Handler for the absolute value.""" >> >> (see PEP 257 [1]) over >> >> """handler for the absolute value""" >> >> but that's certainly not important. After all, most docstrings in sympy are >>

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Ondrej Certik
On Thu, Aug 13, 2009 at 12:10 PM, Fabian Pedregosa wrote: > > Ondrej Certik wrote: >> On Thu, Aug 13, 2009 at 7:05 AM, Vinzent >> Steinberg wrote: >>> I'd prefer >>> >>> """Handler for the absolute value.""" >>> >>> (see PEP 257 [1]) over >>> >>> """handler for the absolute value""" >>> >>> but th

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Ondrej Certik
On Thu, Aug 13, 2009 at 12:20 PM, Ondrej Certik wrote: > On Thu, Aug 13, 2009 at 12:10 PM, Fabian Pedregosa wrote: >> >> Ondrej Certik wrote: >>> On Thu, Aug 13, 2009 at 7:05 AM, Vinzent >>> Steinberg wrote: I'd prefer """Handler for the absolute value.""" (see PEP 257 [1]

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Ondrej Certik
On Thu, Aug 13, 2009 at 12:39 PM, Ondrej Certik wrote: > On Thu, Aug 13, 2009 at 12:20 PM, Ondrej Certik wrote: >> On Thu, Aug 13, 2009 at 12:10 PM, Fabian Pedregosa wrote: >>> >>> Ondrej Certik wrote: On Thu, Aug 13, 2009 at 7:05 AM, Vinzent Steinberg wrote: > I'd prefer > >

Re: [PATCH 0/6] Refine module

2009-08-13 Thread Vinzent Steinberg
2009/8/13 Ondrej Certik > > On Thu, Aug 13, 2009 at 12:20 PM, Ondrej Certik wrote: > > On Thu, Aug 13, 2009 at 12:10 PM, Fabian Pedregosa > wrote: > >> > >> Ondrej Certik wrote: > >>> On Thu, Aug 13, 2009 at 7:05 AM, Vinzent > >>> Steinberg wrote: > I'd prefer > > """Handler for th

Re: [PATCH 0/6] Refine module

2009-08-14 Thread Fabian Pedregosa
Ondrej Certik wrote: > On Thu, Aug 13, 2009 at 12:39 PM, Ondrej Certik wrote: >> On Thu, Aug 13, 2009 at 12:20 PM, Ondrej Certik wrote: >>> On Thu, Aug 13, 2009 at 12:10 PM, Fabian Pedregosa >>> wrote: Ondrej Certik wrote: > On Thu, Aug 13, 2009 at 7:05 AM, Vinzent > Steinberg wrote: