[SciPy-user] r_ not defined while using signal.freqs

Robert Kern robert.kern at gmail.com
Fri Jan 19 01:34:30 CST 2007


Kumar Appaiah wrote:
> Dear SciPy users,
> 
> While trying to use signal.freqs, I get the following error:
> 
> <error>
> In [1]: from scipy import *
> 
> In [2]: [w, h] = signal.freqs([1, 2, 5626], [1, 2, 2])
> ---------------------------------------------------------------------------
> exceptions.NameError                                 Traceback (most
> recent call last)
> 
> /home/kumar/python/filter_test/<ipython console> 
> 
> /usr/lib/python2.4/site-packages/scipy/signal/filter_design.py in
> freqs(b, a, worN, plot)
>      57     """
>      58     if worN is None:
> ---> 59         w = findfreqs(b,a,200)
>      60     elif isinstance(worN, types.IntType):
>      61         N = worN
> 
> /usr/lib/python2.4/site-packages/scipy/signal/filter_design.py in
> findfreqs(num, den, N)
>      23         ep = atleast_1d(-1000)+0j
>      24 
> ---> 25     ez = r_['-1',numpy.compress(ep.imag >=0, ep,axis=-1),
> numpy.compress((abs(tz) < 1e5) & (tz.imag >=0),tz,axis=-1)]
>      26 
>      27     integ = abs(ez) < 1e-10
> 
> NameError: global name 'r_' is not defined
> </error>

Fixed.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the SciPy-user mailing list