help needed debugging strange error with import

24 views
Skip to first unread message

smichr

unread,
Nov 16, 2012, 9:04:40 PM11/16/12
to sy...@googlegroups.com
In https://github.com/sympy/sympy/pull/1653 there is what appears to be a fairly innocuous addition of a test that causes many unrelated tests to fail. I have no idea what is going on. You can see that the 2nd to last commit passes and then there are a bunch of failures in the last commit.

Any help would appreciated.

smichr

unread,
Nov 16, 2012, 9:09:55 PM11/16/12
to sy...@googlegroups.com
The failing report is at https://travis-ci.org/sympy/sympy/builds/3212369  and another one will be available when the tests finish again. There should be no difference, however, since I only squashed the last two commits together.

Ronan Lamy

unread,
Nov 16, 2012, 11:04:11 PM11/16/12
to sy...@googlegroups.com
Le 17/11/2012 02:09, smichr a �crit :
It's something to do with Function('gamma') somehow pre-empting the real
gamma function. The problem can easily be reproduced in master:

In [1]: Function('gamma')
Out[1]: sympy.core.function.gamma

In [2]: from sympy.core.tests.test_wester import test_J10

In [3]: test_J10()
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/home/ronan/dev/sympy/<ipython-input-3-fced9a91586b> in <module>()
----> 1 test_J10()

/home/ronan/dev/sympy/sympy/core/tests/test_wester.pyc in test_J10()
510 def test_J10():
511 mu, nu = symbols('mu, nu', integer=True)
--> 512 assert assoc_legendre(nu, mu, 0) ==
2**mu*sqrt(pi)/gamma((nu-mu)/2+1)/gamma((-nu-mu+1)/2)
513
514 def test_J11():

AssertionError:



Ronan Lamy

unread,
Nov 16, 2012, 11:18:27 PM11/16/12
to sy...@googlegroups.com
Le 17/11/2012 04:04, Ronan Lamy a �crit :
Oh, I know what it is. assoc_legendre uses C.gamma. This is a live
instance of the problem with C.stuff that I described a few weeks ago:
https://groups.google.com/d/msg/sympy/g7KJ1N1XAA4/Gq1DBJuGAXUJ

smichr

unread,
Nov 17, 2012, 12:11:40 AM11/17/12
to sy...@googlegroups.com
Do you have any idea how what I am doing is triggering that failure? (and how to fix it?)

Aaron Meurer

unread,
Nov 17, 2012, 12:32:29 AM11/17/12
to sy...@googlegroups.com
Short-term fix: replace C.gamma with just gamma

Long-term fix: remove C.

Aaron Meurer


On Fri, Nov 16, 2012 at 10:11 PM, smichr <smi...@gmail.com> wrote:
Do you have any idea how what I am doing is triggering that failure? (and how to fix it?)

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/M3GHlf_fijQJ.

To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.

smichr

unread,
Nov 17, 2012, 12:35:25 AM11/17/12
to sy...@googlegroups.com
Do you know why my change triggers this?

Aaron Meurer

unread,
Nov 17, 2012, 1:03:05 AM11/17/12
to sy...@googlegroups.com
Apparently it is your use of Function('gamma') (from https://github.com/sympy/sympy/pull/1653/files#L2R460 I guess).

Aaron Meurer


On Fri, Nov 16, 2012 at 10:35 PM, smichr <smi...@gmail.com> wrote:
Do you know why my change triggers this?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/SQk3x4vHOpsJ.

smichr

unread,
Nov 17, 2012, 1:49:30 AM11/17/12
to sy...@googlegroups.com
OK, now I see the link (though I don't understand all the reasons it happens). Let's see how the tests go now.
Reply all
Reply to author
Forward
0 new messages