[Scipy-svn] r2632 - trunk/Lib/signal

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Jan 29 17:03:20 CST 2007


Author: oliphant
Date: 2007-01-29 17:03:18 -0600 (Mon, 29 Jan 2007)
New Revision: 2632

Modified:
   trunk/Lib/signal/filter_design.py
Log:
Fix integer-input problems

Modified: trunk/Lib/signal/filter_design.py
===================================================================
--- trunk/Lib/signal/filter_design.py	2007-01-29 21:41:41 UTC (rev 2631)
+++ trunk/Lib/signal/filter_design.py	2007-01-29 23:03:18 UTC (rev 2632)
@@ -624,8 +624,8 @@
         passb = tan(wp*pi/2.0)
         stopb = tan(ws*pi/2.0)
     else:
-        passb = wp
-        stopb = ws
+        passb = wp*1.0
+        stopb = ws*1.0
 
     if filter_type == 1:            # low
         nat = stopb / passb
@@ -729,11 +729,11 @@
 
     # Pre-wagpass frequencies
     if not analog:
-        passb = tan(pi*wp/2)
-        stopb = tan(pi*ws/2)
+        passb = tan(pi*wp/2.)
+        stopb = tan(pi*ws/2.)
     else:
-        passb = wp
-        stopb = ws
+        passb = wp*1.0
+        stopb = ws*1.0
 
     if filter_type == 1:           # low
         nat = stopb / passb
@@ -806,11 +806,11 @@
 
     # Pre-wagpass frequencies
     if not analog:
-        passb = tan(pi*wp/2)
-        stopb = tan(pi*ws/2)
+        passb = tan(pi*wp/2.0)
+        stopb = tan(pi*ws/2.0)
     else:
-        passb = wp
-        stopb = ws
+        passb = wp*1.0
+        stopb = ws*1.0
 
     if filter_type == 1:           # low
         nat = stopb / passb
@@ -906,8 +906,8 @@
 
     # Pre-wagpass frequencies
     if analog:
-        passb = wp
-        stopb = ws
+        passb = wp*1.0
+        stopb = ws*1.0
     else:
         passb = tan(wp*pi/2.0)
         stopb = tan(ws*pi/2.0)



More information about the Scipy-svn mailing list