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

Kumar Appaiah akumar at iitm.ac.in
Fri Jan 19 02:35:08 EST 2007


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>

However, r_ seems to work when I try it from the ipython console.

I am using the packaged scipy on Debian GNU/Linux (i386), if that
helps.

Thanks!

Kumar
-- 
Kumar Appaiah,
462, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036




More information about the SciPy-User mailing list