By the way, I get this behavior in your branch:

In [5]: 2*(x + y)
Out[5]: 2⋅(x + y)

In [6]: 2*(x + y) + x
Out[6]: 3⋅x + 2⋅y

Was this intentional?

Aaron Meurer

On Mon, Nov 28, 2011 at 12:28 AM, Aaron Meurer <[email protected]> wrote:
> Hi.
>
> This is great.  I thought you had abandoned the work.  It's good to
> see that you are picking it up again.
>
> On Sun, Nov 27, 2011 at 6:52 PM, Mateusz Paprocki <[email protected]> wrote:
>> Hi,
>>
>> On 28 November 2011 02:01, Kate MacInnis <[email protected]> wrote:
>>>
>>> So last spring, I started working on removing the auto-distribution of
>>> constants.  Life got busy, and I had to set that project aside for
>>> awhile.  When I decided to come back to it over the long weekend, I
>>> decided to start fresh.  I've now got almost all tests passing.  :-)
>>
>> Thanks for working on this.
>>
>>>
>>> But I do have a couple of questions.
>>>
>>> Awhile back, there was talk of a hint manager for expand.  Whatever
>>> happened with that?  Was it that the behavior couldn't be agreed on,
>>> or was it just a matter of getting busy with other things?  I've
>>> implemented a simple one as part of my solution.  If any hint is set
>>> to True, it runs only that hint.
>>
>> Being busy is one thing, but the real problem is that expand()'s API is just
>> to complex and adding a hint manager may not solve our problems. Also, a
>> sort of option manager was implemented in sympy.polys.polyoptions and can be
>> adapted for usage in expand().
>
> I think the hint manager that Chris was working on ended up being
> bogged down with other code, and no one ever got to reviewing it.  The
> simple thing you explain should be a good enough start.  If you want
> to adapt the Polys hint manager, that would be nice.  But as Mateusz
> said, we need to refactor all of expand() anyway.
>
>>
>>>
>>> Also, on the two tests that I haven't gotten to pass yet:
>>>
>>> I'm getting an AttributeError exception in integrals/tests/
>>> test_risch.py, but if I run the test from inside isympy it doesn't
>>> have a problem.  Any ideas?
>>
>> I don't get this failure when using your branch. Can you post output from
>> bin/test (complete with architecture, seed, ground types, etc.)? Do you test
>> the individual file or the whole test suite (are there any differences in
>> outcome)?
>
> Also, see if it makes a difference if the cache is enabled or not.  It
> is enabled by default. You can disable it by passing -C to isympy or
> to ./bin/test.  Note that there are test failures in master with the
> cache off, so if you find a failure with that, see if it's in master
> too.  Also note that things are a lot slower with the cache off
> (especially in expand() code), so I recommend not trying to run the
> whole test suite with the cache off.
>
> Aaron Meurer
>
>>
>>>
>>> The only other test that I'm having a problem with is test_formulae in
>>> simplify/tests/test_hyperexpand.py.  It has a loop where it
>>> numerically tests each formula in FormulaCollection.  Are there any
>>> resources anyone can point me to as I wrap my head around this one?
>>
>> I reproduced the problem. I will look into this.
>>
>>>
>>> If anyone wants to take a look at it, here's my working branch:
>>> https://github.com/kmacinnis/sympy/tree/remove-auto-distribution  I
>>> apologize in advance if the commit history is a little screwy-- when I
>>> tried to rebase on the most recent updates things got a little mangled
>>> up.
>>>
>>> Thanks in advance for any feedback.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "sympy" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/sympy?hl=en.
>>>
>>
>> Mateusz
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sympy" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/sympy?hl=en.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to