e.g. python2.6. On Mon, Aug 10, 2009 at 8:08 PM, Ondrej Certik<ond...@certik.cz> wrote: > Ubuntu, 64 bits. > > Ondrej > > On Mon, Aug 10, 2009 at 6:31 PM, Fabian Pedregosa > Izquierdo<fab...@fseoane.net> wrote: >> >> Ondrej Certik wrote: >>> On Mon, Aug 10, 2009 at 5:34 PM, Fabian Pedregosa<fab...@fseoane.net> 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/queries or in sympy/refine/ >>>> >>>> You can pull from my branch refine: git pull >>>> http://fseoane.net/git/sympy.git refine >>> >>> This test fails for me: >>> >>> ________________________________________________________________________________ >>> ________ sympy/concrete/tests/test_sums_products.py:test_composite_sums >>> ________ >>> File >>> "/home/ondrej/repos/sympy/sympy/concrete/tests/test_sums_products.py", >>> line 41, in test_composite_sums >>> s = sum(f, (n, a, b)) >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line 164, >>> in sum >>> return summation.doit() >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line 69, in >>> doit >>> f = eval_sum(f, (i, a, b)) >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line >>> 231, in eval_sum >>> value = eval_sum_symbolic(f.expand(), (i, a, b)) >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line >>> 255, in eval_sum_symbolic >>> rsum = eval_sum_symbolic(R, (i, a, b)) >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line >>> 252, in eval_sum_symbolic >>> lrsum = telescopic(L, R, (i, a, b)) >>> File "/home/ondrej/repos/sympy/sympy/concrete/summations.py", line >>> 211, in telescopic >>> s = solve(L.subs(i, i + m) + R, m)[0] >>> File "/home/ondrej/repos/sympy/sympy/solvers/solvers.py", line 209, in >>> solve >>> result = roots(poly, cubics=True, quartics=True).keys() >>> File "/home/ondrej/repos/sympy/sympy/polys/rootfinding.py", line 300, in >>> roots >>> result = _try_decompose(f) >>> File "/home/ondrej/repos/sympy/sympy/polys/rootfinding.py", line >>> 210, in _try_decompose >>> for r in _try_heuristics(h): >>> File "/home/ondrej/repos/sympy/sympy/polys/rootfinding.py", line >>> 242, in _try_heuristics >>> if f(i).expand().is_zero: >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 366, in >>> getit >>> return self._what_known_about(name) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 279, >>> in _what_known_about >>> a = getattr(self,'is_'+pk) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 366, in >>> getit >>> return self._what_known_about(name) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 256, >>> in _what_known_about >>> a = getattr(self,'_eval_is_'+k)() >>> File "/home/ondrej/repos/sympy/sympy/core/add.py", line 234, in <lambda> >>> _eval_is_integer = lambda self: >>> self._eval_template_is_attr('is_integer') >>> File "/home/ondrej/repos/sympy/sympy/core/operations.py", line 148, >>> in _eval_template_is_attr >>> a = getattr(t, is_attr) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 366, in >>> getit >>> return self._what_known_about(name) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 265, >>> in _what_known_about >>> self._learn_new_facts( ((k,a),) ) >>> File "/home/ondrej/repos/sympy/sympy/core/assumptions.py", line 340, >>> in _learn_new_facts >>> self._assume_rules.deduce_all_facts(facts, base) >>> File "/home/ondrej/repos/sympy/sympy/core/facts.py", line 882, in >>> deduce_all_facts >>> assert new_facts[k] == v, ('inconsitency between facts',new_facts,k,v) >>> AssertionError: ('inconsitency between facts', {'prime': False, >>> 'real': True, 'comparable': False, 'noninteger': True, 'irrational': >>> False, 'nonpositive': True, 'composite': False, 'positive': False, >>> 'even': False, 'negative': None, 'nonnegative': None, 'zero': False, >>> 'complex': True, 'bounded': None, 'unbounded': None, 'integer': False, >>> 'imaginary': False, 'nonzero': True, 'odd': False, 'commutative': >>> True}, 'negative', True) >>> >>> tests finished: 1589 passed, 1 failed, 6 skipped, 28 xfailed, 1 >>> xpassed in 155.72 seconds >>> DO *NOT* COMMIT! >>> >>> >>> everything else seems to be running, in general it looks good. >> >> I can't reproduce that bug .. what architecture and python version are >> you running ? >> >>> >>> Vinzent, if you have time, please review it too. I will go over it >>> carefully in the evening, to make sure no functionality is lost, but >>> so far it looks good. >>> >>> Ondrej >>> >>> > >> >> >> >> >> >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---