[SciPy-User] convolve2d ComplexWarning

Snow Man snow_man013 at hotmail.com
Wed Jun 15 00:46:39 EDT 2011


Hello,
I wasn't sure how else to get help with this, as there is no forum for scipy, so if someone could help me this would be great.
I installed the latest versions of scipy and numpy as of (June 15 2011) and I'm trying to do some simple image processing. However the scipy.signal.convolve2d keeps throwing an error:
"
C:\Python26\lib\site-packages\scipy\signal\signaltools.py:408: ComplexWarning: Casting complex values to real discards the imaginary part  return sigtools._convolve2d(in1,in2,1,val,bval,fillvalue)
"
And I have no idea where else to get help.
More info:
windows 7 64bit
started with pythonxy 2.6.6.1
when that didnt work reinstalled latest numpy and scipy . . . still didn't work.
the code I'm runing is :

from numpy import *
from scipy import *
from scipy.signal import *
import pylab


dna = double(misc.imread('dna.jpeg'))

pylab.imshow(dna)
pylab.show()
pylab.gray()

# lets write an edge detector

mask = array([[1,1,1],[1,3,1],[1,1,1]],double)
mask = mask/sum(mask)

rsl = convolve2d(dna,mask,mode='full',boundary = 'fill' ,fillvalue=0.0)


pylab.imshow(rsl)

please help.
Thank you. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110615/20bce262/attachment.html>


More information about the SciPy-User mailing list