[SciPy-user] Possibly bug in signal.module mean function

Stefan Mogck s.mogck at phys.rug.nl
Thu Dec 5 03:37:38 EST 2002


Hi scipy-user,

I'd like to use the wienfilter for filtering my images. I tried again first 
an example from the manual:

stefan at mk39:~> python
Python 2.2.2 (#1, Nov 28 2002, 09:15:11) 
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gui_thread
>>> <Importing wxPython...  done.>
>>> from scipy import *
>>> from scipy import plt
>>> from Numeric import *
>>> from RandomArray import normal
>>> img=plt.lena()
>>> plt.image(img)
<type 'array'> ['__copy__', '__deepcopy__', 'astype', 'byteswapped', 'copy', 
'iscontiguous', 'itemsize', 'resize', 'savespace', 'spacesaver', 'tolist', 
'toscalar', 'tostring', 'typecode']
<C wxFrame instance at _41200618_wxFrame_p>
>>> noisy_img=img+normal(0,32,shape(img))
>>> plt.figure()
<C wxFrame instance at _886a420_wxFrame_p>
>>> plt.image(noisy_img)
<type 'array'> ['__copy__', '__deepcopy__', 'astype', 'byteswapped', 'copy', 
'iscontiguous', 'itemsize', 'resize', 'savespace', 'spacesaver', 'tolist', 
'toscalar', 'tostring', 'typecode']
<C wxFrame instance at _886a420_wxFrame_p>
>>> cleaned_img=signal.wiener(noisy_img)        
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.2/site-packages/scipy/signal/signaltools.py", 
line 223, in wiener
    noise = Numeric.mean(Numeric.ravel(lVar))
AttributeError: 'module' object has no attribute 'mean'


I am using SciPy -0.2.0_alpha_144.4350 and Numeric-22.0 under pythojn 2.2.2. 
Have anyvbody an idea about this problem. I want to understand this problem

Stefan



More information about the SciPy-User mailing list