[Numpy-discussion] Convolve returning zero array

Peter Verveer verveer at embl-heidelberg.de
Mon Dec 15 03:05:04 EST 2003


Hi Remco,

Sounds like a bug. Which version of numarray do you use? Version 0.8 of 
numarray should have appeared on sourceforge now. If the convolve in that 
version does still not work, you could try out the convolution function in 
the new nd_image package that is part of numarray 0.8. If that does not work, 
let me know since I am the author of that package, and will fix problems with 
it.

Cheers, Peter

On Monday 15 December 2003 11:24, R.Jager at mapperlithography.com wrote:
> Hi list,
>
> I already posted this on the numarray forum on freshmeat, but Jay T Miller
> advised me to post my problem to this list. OK, now for the problem: I try
> to convolve a Gaussian distribution with a binary pattern. For small values
> of the sigma of the Gaussian distribution the convolution returns an array
> of zeros. For a large value the results are OK.
> I did some more research and found out that the zero array is returned if
> the length of the Gaussian is smaller than the length of the binary
> pattern. In the function call the Gaussian is the kernel and the binary
> pattern is the data. The convolution mode is 'SAME'. I have swapped the
> data and kernel in the convolve function call, but this has no influence on
> the result, as this is swapped again in convolve.py. A quick and dirty
> workaround is to always make the Gaussian distribution longer than the
> binary pattern, but for very large binary patterns this increases the
> calculation time significantly. Does anyone have an idea how to solve this
> properly?
>
> Met vriendelijke groeten,
>
> Remco Jager
>
> MAPPER Lithography
> Lorentzweg 1
> 2628 CJ Delft, The Netherlands
> tel.: +31 (0)15 2789439
> fax: +31 (0)15-2789473
> http://www.mapperlithography.com
>
> This e-mail, attachments and (any part of) its content are (i) intended for
> the named addressee(s) only and (ii) strictly confidential and proprietary.
> All rights are reserved by MAPPER Lithography. Any unauthorized use,
> disclosure and/or copying are strictly prohibited, except with prior and
> express written permission by MAPPER Lithography. Should you have received
> this e-mail, attachments and its content by mistake, please bring this to
> our attention and destroy this e-mail and attachments in full. Thank you.
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion

-- 
Dr. Peter J. Verveer
Cell Biology and Cell Biophysics Programme
European Molecular Biology Laboratory
Meyerhofstrasse 1
D-69117 Heidelberg
Germany
Tel. : +49 6221 387245
Fax  : +49 6221 387306





More information about the NumPy-Discussion mailing list