[Numpy-discussion] TypeError when calling numpy.kaiser()

Jeffrey McGee jeffamcgee@gmail....
Sun Oct 18 14:11:49 CDT 2009

I'm having trouble getting the kaiser window to work.  Anytime I try
to call numpy.kaiser(), it throws an exception.  Here's the output when
I run the example code from
http://docs.scipy.org/doc/numpy/reference/generated/numpy.kaiser.html :

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import kaiser
>>> kaiser(12, 14)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/numpy/lib/function_base.py",
line 2630, in kaiser
    return i0(beta * sqrt(1-((n-alpha)/alpha)**2.0))/i0(beta)
  File "/usr/lib/python2.6/dist-packages/numpy/lib/function_base.py",
line 2507, in i0
    y[ind] = _i0_1(x[ind])
TypeError: array cannot be safely cast to required type

Is this a bug?  Am I doing something wrong?  (I'm using the Ubuntu 9.4
packages for python and numpy.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091018/7690a079/attachment.html 

More information about the NumPy-Discussion mailing list