[PATCH 1 of 2] Move evaluation of interval to _eval_interval method of Basic. Allows for functions to override for integration with limits

2008-10-21 Thread Andy R Terrel
# HG changeset patch # User "Andy R Terrel <[EMAIL PROTECTED]>" # Date 1224619309 18000 # Node ID 077e4d22890139d23f838926f307a9ed9054509b # Parent 876257540928cb285fe382ecea2ae0b25960d209 Move evaluation of interval to _eval_interval method of Basic. Allows for functions to override for integr

[PATCH 2 of 2] Adding ExprCondPair data structure to piecewise objects and cleaning code

2008-10-21 Thread Andy R Terrel
# HG changeset patch # User "Andy R Terrel <[EMAIL PROTECTED]>" # Date 1224619309 18000 # Node ID a4acb162ad0d40b8d86ee64b4a8cfa4c5426bc3e # Parent 077e4d22890139d23f838926f307a9ed9054509b Adding ExprCondPair data structure to piecewise objects and cleaning code. diff --git a/sympy/functions/ele

[PATCH 0 of 2] Improvements on piecewise functions, refactoring evaluation of an interval

2008-10-21 Thread Andy R Terrel
This series of patches: -- Improves the piecewise function interface by adding an ExprCondPair. This will allow the args to comply with the requirement that they be a subclass of Basic. -- Refactoring evaluation of an interval to one call _eval_interval. This way other

Fwd: [PATCH] Make Rational accept a wider range of types as arguments.

2008-10-21 Thread Fabian Seoane
-- Forwarded message -- From: Fabian Seoane <[EMAIL PROTECTED]> Date: 2008/10/21 Subject: Re: [PATCH] Make Rational accept a wider range of types as arguments. To: sympy-patches@googlegroups.com > > > But then Rational(1.) == Integer(1) > > and that is not only ugly but incorr

Fwd: [PATCH] Make Rational accept a wider range of types as arguments.

2008-10-21 Thread Fabian Seoane
(sorry if you receive this twice, my email client got crazy) > > > But then Rational(1.) == Integer(1) > > and that is not only ugly but incorrect ... > > A solution would be to check if int(p) == p. > yeah, that would be a nice solution, but I think that accepting float's as arguments is in

Re: [PATCH] Make Rational accept a wider range of types as arguments.

2008-10-21 Thread Ondrej Certik
On Tue, Oct 21, 2008 at 11:00 PM, Fabian Seoane <[EMAIL PROTECTED]> wrote: > > > -- Forwarded message -- > From: Fabian Seoane <[EMAIL PROTECTED]> > Date: 2008/10/21 > Subject: Re: [PATCH] Make Rational accept a wider range of types as > arguments. > To: sympy-patches@googlegroups.

Re: [PATCH 1 of 2] Move evaluation of interval to _eval_interval method of Basic. Allows for functions to override for integration with limits

2008-10-21 Thread Ondrej Certik
On Tue, Oct 21, 2008 at 10:07 PM, Andy R Terrel <[EMAIL PROTECTED]> wrote: > > # HG changeset patch > # User "Andy R Terrel <[EMAIL PROTECTED]>" > # Date 1224619309 18000 > # Node ID 077e4d22890139d23f838926f307a9ed9054509b > # Parent 876257540928cb285fe382ecea2ae0b25960d209 > Move evaluation of

Re: [PATCH 2 of 2] Adding ExprCondPair data structure to piecewise objects and cleaning code

2008-10-21 Thread Ondrej Certik
This is +1, thanks! On Tue, Oct 21, 2008 at 10:07 PM, Andy R Terrel <[EMAIL PROTECTED]> wrote: > > # HG changeset patch > # User "Andy R Terrel <[EMAIL PROTECTED]>" > # Date 1224619309 18000 > # Node ID a4acb162ad0d40b8d86ee64b4a8cfa4c5426bc3e > # Parent 077e4d22890139d23f838926f307a9ed9054509b

[PATCH] Make Rational accept arguments of type Integer.

2008-10-21 Thread fabian . seoane
From: Fabian Seoane <[EMAIL PROTECTED]> --- sympy/core/numbers.py| 12 +--- sympy/core/tests/test_numbers.py | 13 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sympy/core/numbers.py b/sympy/core/numbers.py index 000d326..da2b833 100644 ---

Re: [PATCH] Make Rational accept arguments of type Integer.

2008-10-21 Thread Ondrej Certik
This looks good to me. Fredrik, what do you think? Ondrej On Wed, Oct 22, 2008 at 1:11 AM, <[EMAIL PROTECTED]> wrote: > > From: Fabian Seoane <[EMAIL PROTECTED]> > > --- > sympy/core/numbers.py| 12 +--- > sympy/core/tests/test_numbers.py | 13 + > 2 files c