2008/7/7 Ondrej Certik <[EMAIL PROTECTED]>:
> The docs are here:
>
> http://docs.sympy.org/modules/rewriting.html#module-sympy.simplify.cse_main
>
> Stefan, what is the preferred way to document things in numpy? I mean
> what kind of REST markup one should use in docstrings, so that it
> looks nic
On Sun, Jul 6, 2008 at 12:45 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> On Sun, Jul 6, 2008 at 12:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>
>> On Tue, Jul 1, 2008 at 10:38, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>> Any progress on this? I think it's time to make anothe release, let's
On Sun, Jul 6, 2008 at 2:57 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Sun, Jul 6, 2008 at 07:55, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>
>> On Sun, Jul 6, 2008 at 2:19 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>>
>>> On Sun, Jul 6, 2008 at 07:13, Ondrej Certik <[EMAIL PROTECTED]> wro
On Sun, Jul 6, 2008 at 07:55, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> On Sun, Jul 6, 2008 at 2:19 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>
>> On Sun, Jul 6, 2008 at 07:13, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>> diff --git a/sympy/simplify/__init__.py b/sympy/simplify/__init__.py
>>
On Sun, Jul 6, 2008 at 2:19 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Sun, Jul 6, 2008 at 07:13, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>> diff --git a/sympy/simplify/__init__.py b/sympy/simplify/__init__.py
>> --- a/sympy/simplify/__init__.py
>> +++ b/sympy/simplify/__init__.py
>> @@ -1
On Sun, Jul 6, 2008 at 07:13, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> diff --git a/sympy/simplify/__init__.py b/sympy/simplify/__init__.py
> --- a/sympy/simplify/__init__.py
> +++ b/sympy/simplify/__init__.py
> @@ -10,3 +10,5 @@ from rewrite import cancel, trim, apart
> from rewrite import can
> You should also decide where the main cse() function ought to be
> exposed. I punted, and didn't expose it in sympy.* or
> sympy.simplify.*.
I'd add the following patch:
# HG changeset patch
# User Ondrej Certik <[EMAIL PROTECTED]>
# Date 1215346162 -7200
# Node ID a899701f1e4f303dcc41fd4a1e00
On Sun, Jul 6, 2008 at 05:45, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> On Sun, Jul 6, 2008 at 12:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>
>> On Tue, Jul 1, 2008 at 10:38, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>> Any progress on this? I think it's time to make anothe release, let's
On Sun, Jul 6, 2008 at 12:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Tue, Jul 1, 2008 at 10:38, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>> Any progress on this? I think it's time to make anothe release, let's
>> say on Monday. If you are busy, I propose to put the code that we have
>> i
On Tue, Jul 1, 2008 at 10:38, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Any progress on this? I think it's time to make anothe release, let's
> say on Monday. If you are busy, I propose to put the code that we have
> in (with my patch and a comment how to proceed with fixing it
> generally) and w
On Tue, Jul 1, 2008 at 10:38, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Any progress on this? I think it's time to make anothe release, let's
> say on Monday. If you are busy, I propose to put the code that we have
> in (with my patch and a comment how to proceed with fixing it
> generally) and w
On Thu, Jun 19, 2008 at 10:10 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 19, 2008 at 7:42 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>
>> On Wed, Jun 18, 2008 at 05:44, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>>
>>> On Wed, Jun 18, 2008 at 11:50 AM, Robert Kern <[EMAIL PROTECTED
On Thu, Jun 19, 2008 at 7:42 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 18, 2008 at 05:44, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>
>> On Wed, Jun 18, 2008 at 11:50 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
>>> I can probably implement multiple expression support + unit tests
On Wed, Jun 18, 2008 at 05:44, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 18, 2008 at 11:50 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> I can probably implement multiple expression support + unit tests +
>> subtraction preprocessing in a few days time.
>
> Excellent. In this case,
On Wed, Jun 18, 2008 at 3:26 PM, Fredrik Johansson
<[EMAIL PROTECTED]> wrote:
> I've implemented an evaluate=False option for Add, Mul, Pow and
> functions (see attachment). This could be useful to suppress default
> behavior like Sub(x,y) -> Add(x,Mul(-1,y)) for code generation etc. As
> it happe
I've implemented an evaluate=False option for Add, Mul, Pow and
functions (see attachment). This could be useful to suppress default
behavior like Sub(x,y) -> Add(x,Mul(-1,y)) for code generation etc. As
it happens, I need something like this for evalf testing as well.
Fredrik
--~--~-~--~
On Wed, Jun 18, 2008 at 11:50 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 18, 2008 at 04:32, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
>> 1) commit your patch as is and wait until someone fixes the x-y
>> problem in a general way
>> 2) commit your patch + my patch + a good comment,
On Wed, Jun 18, 2008 at 04:32, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> 1) commit your patch as is and wait until someone fixes the x-y
> problem in a general way
> 2) commit your patch + my patch + a good comment, that adding further
> special cases are not acceptable and one should refactor i
On Wed, Jun 18, 2008 at 11:23 AM, Pearu Peterson
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Jun 18, 9:13 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote:
>> On Wed, Jun 18, 2008 at 11:03 AM, Pearu Peterson
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > In sympycore we have Verbatim class that holds
On Jun 18, 9:13 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 18, 2008 at 11:03 AM, Pearu Peterson
>
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > In sympycore we have Verbatim class that holds expressions without
> > any evaluation. E.g. it can hold the expression 'x - y' in both
On Wed, Jun 18, 2008 at 11:03 AM, Pearu Peterson
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> In sympycore we have Verbatim class that holds expressions without
> any evaluation. E.g. it can hold the expression 'x - y' in both
> forms: Add(x, -y) and Sub(x, y). Converting to Verbatim and back
> to the d
Hi,
In sympycore we have Verbatim class that holds expressions without
any evaluation. E.g. it can hold the expression 'x - y' in both
forms: Add(x, -y) and Sub(x, y). Converting to Verbatim and back
to the default representation is relatively cheap. May sympy should
implement a similar scheme in
On Wed, Jun 18, 2008 at 03:29, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>> It does, but it can be easily fixed, see above. I.e. fixing your
>>> algorithm. :) The other option, as you said, is fixing sympy. We would
>>> have to introduce a Sub class.
>>> But I think it would just make things more
> It is certainly correct for that representation. However, my claim is
> that this representation is suboptimal for the purposes to which one
> wants to apply common subexpression elimination. All of the use cases
> hold as important one of these two criteria:
>
> 1. flop count
> 2. readability
On Tue, Jun 17, 2008 at 02:11, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 11:41 PM, Luke <[EMAIL PROTECTED]> wrote:
>>
>> Robert,
>> The Mathematica link you provided is exactly what I'm trying to do.
>> I haven't tried your python code yet but after reading it I think it
>
On Mon, Jun 16, 2008 at 11:41 PM, Luke <[EMAIL PROTECTED]> wrote:
>
> Robert,
> The Mathematica link you provided is exactly what I'm trying to do.
> I haven't tried your python code yet but after reading it I think it
I did:
http://code.google.com/p/sympy/issues/detail?id=891#c3
> should work
Robert,
The Mathematica link you provided is exactly what I'm trying to do.
I haven't tried your python code yet but after reading it I think it
should work great. I really appreciate your comments and your help!
Thanks,
~Luke
On Jun 16, 12:14 pm, "Robert Kern" <[EMAIL PROTECTED]> wrote:
> O
On Mon, Jun 16, 2008 at 12:13, Luke <[EMAIL PROTECTED]> wrote:
> Essentially what I need to do is parse every equation and identify
> subexressions (and then parse those subexpression and identify
> subsubexpressions), and introduce variables for any that are used
> more than once. If a subex
So I think it has become clear what I'm looking to do. There are many
levels of subexpressions, and equations may be defined by many
different subexpressions. For those of you familiar with classical
mechanics, you are probably aware of the explosion of the number of
terms that arises as the num
On Sun, Jun 15, 2008 at 17:46, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Anyway, I created an issue for this:
>
> http://code.google.com/p/sympy/issues/detail?id=891
I've attached some nominally working code to the issue. Playing with
it, I see some suboptimal results. First, it's quadratic, but
On Sun, Jun 15, 2008 at 12:00:54PM -0700, Luke wrote:
>
> I guess what I'm looking for is more an algorithm to
> help identify and automatically collect common subexpressions so that
> repeated quantities are only calculated once. For each repeated
> subexpression in an equation, an intermediate
On Sun, Jun 15, 2008 at 17:46, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> On Mon, Jun 16, 2008 at 12:10 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Actually, that example is not relevant since there is no repeated
>> subexpression. The idea is to reduce the amount of unnecessarily
>> repeated
On Mon, Jun 16, 2008 at 12:10 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Sun, Jun 15, 2008 at 16:11, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>
>> Hi Luke,
>>
>> On Sun, Jun 15, 2008 at 9:00 PM, Luke <[EMAIL PROTECTED]> wrote:
>>>
>>> Ondrej,
>>> I know that Sympy has the capability to do
On Sun, Jun 15, 2008 at 16:11, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> I don't understand which criteria you use to substitute the
> subexpressions --- the most frequent subexpression?
Here's some help I got a long time ago when I asked about how to do
this with Python ASTs. I never followed u
On Sun, Jun 15, 2008 at 16:11, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
> Hi Luke,
>
> On Sun, Jun 15, 2008 at 9:00 PM, Luke <[EMAIL PROTECTED]> wrote:
>>
>> Ondrej,
>> I know that Sympy has the capability to do symbolic replacement like
>> you described. I guess what I'm looking for is more a
Hi Luke,
On Sun, Jun 15, 2008 at 9:00 PM, Luke <[EMAIL PROTECTED]> wrote:
>
> Ondrej,
> I know that Sympy has the capability to do symbolic replacement like
> you described. I guess what I'm looking for is more an algorithm to
> help identify and automatically collect common subexpressions so t
Ondrej,
I know that Sympy has the capability to do symbolic replacement like
you described. I guess what I'm looking for is more an algorithm to
help identify and automatically collect common subexpressions so that
repeated quantities are only calculated once. For each repeated
subexpression i
Hi Luke!
On Fri, Jun 13, 2008 at 8:45 PM, Luke <[EMAIL PROTECTED]> wrote:
>
> I'm working on some code that symbolically generates equations of
> motion for mechanical systems. I would like the equations to be
> computationally efficient in that they don't repeatedly calculate
> quantities that h
38 matches
Mail list logo