Skip to content

Fix cacheit to cache Add(x,y) and Add(y,x) correctly.#1

Open
goodok wants to merge 5 commits into
flatten_sortfrom
flatten_sort_caching
Open

Fix cacheit to cache Add(x,y) and Add(y,x) correctly.#1
goodok wants to merge 5 commits into
flatten_sortfrom
flatten_sort_caching

Conversation

@goodok

@goodok goodok commented Mar 21, 2012

Copy link
Copy Markdown
Owner

Before this pull request the Add(x,y) and Add(y,x) yield different objects.

It was because the cacheit is called before __new__ method. In turn, the flatten method is calls inside the __new__.

In this pull request we inject the simple flatting procedure to the cacheit wrapper.

Also we allow to set the @cacheit to the '_hashable_content..' function itself and without infinity recursion.
also cache flatten arguments as synonyms in the cache.

Notes:
Only one tests became failure. It is test_heurisch_symbolic_coeffs and marked as XFAIL.

Before this commite the Add(x,y) and Add(y,x) yield different objects.

    >>> Add(x,y) is Add(y,x)
    False

It was because `cacheit` is called before `__new__` method.
In turn, the flatten method is calls inside the __new__.

In this pull request we inject the simple flatting procedure to the cacheit wrapper.

Notes:

Only one tests became to be a failure: "test_heurisch_symbolic_coeffs" in "test_risch"
It is marked as XFAIL now.
@goodok

goodok commented Mar 21, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYlewQDA

Interpreter: /usr/bin/python (2.7.2-final-0)
Architecture: Linux (64-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 80c6cd4

Automatic review by SymPy Bot.

@goodok

goodok commented Mar 21, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYwdwQDA

Interpreter: /usr/bin/python (2.7.2-final-0)
Architecture: Linux (64-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 171d331

Automatic review by SymPy Bot.

@goodok

goodok commented Mar 21, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: There were test failures.

@goodok: Please fix the test failures.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYtbIRDA

Interpreter: /usr/bin/python (2.6.6-final-0)
Architecture: Linux (32-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 80c6cd4

Automatic review by SymPy Bot.

@goodok

goodok commented Mar 22, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYl5MRDA

Interpreter: /usr/bin/python (2.7.2-final-0)
Architecture: Linux (64-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 12895e5

Automatic review by SymPy Bot.

@goodok

goodok commented Mar 22, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYrOQQDA

Interpreter: /home/goodok/a/Python-2.5.6/python (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 12895e5

Automatic review by SymPy Bot.

@goodok

goodok commented Mar 22, 2012

Copy link
Copy Markdown
Owner Author

SymPy Bot Summary: All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYr-QQDA

Interpreter: /usr/bin/python (2.6.6-final-0)
Architecture: Linux (32-bit)
Cache: yes
Test command: setup.py test
master hash: de84ed2
branch hash: 04f42e2

Automatic review by SymPy Bot.

goodok pushed a commit that referenced this pull request Apr 6, 2014
3532: Pow.is_real fix for base = -1
goodok pushed a commit that referenced this pull request Apr 6, 2014
Make erfc and erfi functions available to MeijerG integration code
goodok pushed a commit that referenced this pull request Apr 6, 2014
Make erfc and erfi functions tractable for Gruntz algorithm
goodok pushed a commit that referenced this pull request Apr 6, 2014
goodok pushed a commit that referenced this pull request Apr 6, 2014
delay im(a) calculation
goodok pushed a commit that referenced this pull request Apr 6, 2014
More review on PR 2081: Merged in to PR sympy#2081
goodok pushed a commit that referenced this pull request Apr 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant