[Scipy-tickets] [SciPy] #1441: signals.freqz can evaluate the wrong number of points

SciPy Trac scipy-tickets@scipy....
Fri May 20 21:36:33 CDT 2011


#1441: signals.freqz can evaluate the wrong number of points
--------------------+-------------------------------------------------------
 Reporter:  foton   |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:          
Component:  Other   |     Version:  0.9.0   
 Keywords:          |  
--------------------+-------------------------------------------------------
 I was just bitten by signals.freqz returning the wrong number of
 evaluation points. freqz computes w, the evaluation points, thusly:

 {{{
 #!python
 if worN is None:
     N = 512
     w = numpy.arange(0,lastpoint,lastpoint/N)
 elif isinstance(worN, types.IntType):
     N = worN
     w = numpy.arange(0,lastpoint,lastpoint/N)
 else:
     w = worN
 }}}

 If lastpoint - (lastpoint / N) is close enough to lastpoint, it will
 conclude that you want lastpoint to be included, which you do not for this
 application. Each of those arange calls should be replaced with
 numpy.linspace(0, lastpoint, N, endpoint=False).

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1441>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list