[SciPy-user] Mathieu Function Bug?
Andrew Brainerd
brainerd@MIT....
Tue Aug 21 08:28:20 CDT 2007
Hi,
I've been working with the angular Mathieu functions in scipy.special, and I've come across what seems like a bug. For n = 2 and q < 0.0025, mathieu_cem(n,q,x) seems to be evaluating the n = 0 case instead. The following code makes the bug clear:
import numpy
import pylab
from scipy.special import mathieu_cem
s = arange(0,180,1)
t = mathieu_cem(0,0.001,s)[0]
pylab.plot(s,t)
t = mathieu_cem(2,0.001,s)[0]
pylab.plot(s,t)
t = mathieu_cem(2,0.003,s)[0]
pylab.plot(s,t)
pylab.show()
It would seem like the second and third plots there should be almost the same (slight variations of cos(2x)) but instead, the first and second plots are almost the same. Is this a known bug, something that has been fixed recently, some bug in my own installation, or what? I've managed to get around the problem in my case by just using a series approximation for small q and n = 2, so I don't need an immediate fix or anything like that.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070821/bca7d940/attachment.html
More information about the SciPy-user
mailing list