Help on Sympy HyperGeometric functions

61 views
Skip to first unread message

D.V.S Phanindra

unread,
May 13, 2015, 11:16:47 AM5/13/15
to sy...@googlegroups.com
Hi,
 I am using the hyp2f1() function in the mpmath library. I tried to plot the example (No:3) given in the link: http://reference.wolfram.com/language/ref/Hypergeometric2F1.html. But the values generated by sympy's hyp2f1() function are different than the ones given in the example. I tried using the hyper() function which is generalized hypergeometric function with p=2 and q=1 but the result is the same. I need to use hypergeometric functions (with p=3 and q=2) in one of the codes that I am writing but this basic example is not working for me. Can anybody point out the mistake that I made. Thank you.

from sympy.mpmath import hyp2f1
from matplotlib import pyplot as plt

a
=mp.linspace(-1,1,100)
y
=[]
for i in a:
    y
.append(hyp2f1(1.0/3.0,1.0/3.0,2.0/3.0,i))
plt
.plot(a,y)
plt
.grid()


Kalevi Suominen

unread,
May 17, 2015, 1:15:20 AM5/17/15
to sy...@googlegroups.com
> But the values generated by sympy's hyp2f1() function are different than the ones given in the example.

Can you explain in more detail in which way the values are different?
Reply all
Reply to author
Forward
0 new messages