diff options
| author | David Cournapeau <cournape@gmail.com> | 2010-03-31 02:26:14 +0000 |
|---|---|---|
| committer | David Cournapeau <cournape@gmail.com> | 2010-03-31 02:26:14 +0000 |
| commit | ced34d27a8eef42e0f963afa4989e2383fc3ca77 (patch) | |
| tree | 0b1d244cb0d4c0bce10b0206c4056cc5e91d9b8d /numpy/lib/function_base.py | |
| parent | cfb3c55e3813cc05673a37452dea405fc0acea03 (diff) | |
| download | numpy-ced34d27a8eef42e0f963afa4989e2383fc3ca77.tar.gz | |
BUG: fix kaiser for M=1.
Diffstat (limited to 'numpy/lib/function_base.py')
| -rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 87ecf717e..3b8ddf099 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2608,6 +2608,8 @@ def kaiser(M,beta): """ from numpy.dual import i0 + if M == 1: + return np.array([1.]) n = arange(0,M) alpha = (M-1)/2.0 return i0(beta * sqrt(1-((n-alpha)/alpha)**2.0))/i0(float(beta)) |
