-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/02/2014 01:43, Aaron Meurer wrote:
> We should just change all the special polynomial objects to not 
> evaluate by default. jacobi_normalized actually *is* a class, but
> it evaluates whenever the degree is an explicit integer. But
> there's no need for this, as we already have *_poly versions of
> these functions to do that.
> 
> Until this gets fixed (PRs welcome), a workaround would be to use 
> Symbol('n') for the degree, and replace it with the number you want
> at the post-processing stage (how to do this will depend on what
> your post-processing stage looks like; for lambdify(), you can just
> set {n: 2} in the modules dictionary).

This is my current solution -- and it seems to work reasonably well.
Unfortunately, as I reported here
<https://github.com/fredrik-johansson/mpmath/issues/14>, there appear
to be some bugs how mpmath evaluates certain Jacobi polynomials:

In [2]: bad = 0

In [3]: for i in range(5):
   ...:     for j in range(5):
   ...:         for k in range(5):
   ...:             try:
   ...:                 mp.jacobi(i, j, k, 0)
   ...:             except:
   ...:                 bad += 1
   ...:

In [4]: bad
Out[4]: 12

So it looks like, for the moment, I will need to stick to letting
SymPy convert these objects to explicit polynomials before lambdification.

Regards, Freddie.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlL0u2oACgkQ/J9EM/uoqVdddwCeJNM0tAHeBfeVlpazKnqnzTpU
gOEAoIE3VPTuIWOYZrrxdR+ODCj/KYl/
=JqPe
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to