|
From: Alexandre G. <gu...@gu...> - 2005-09-22 15:48:29
|
Hi. I think I found a bug in gaussian_filter1d. roughly the function creates a 1d kernel and then calls correlate1d. The problem I see is that the kernel should be mirrored prior to calling correlate1d since we want to convolve, not correlate. as a result: >>> import numarray.nd_image >>> numarray.nd_image.gaussian_filter1d( ( 0.0, 1.0, 0.0 ), 1, order =3D 1, axis =3D 0, mode =3D 'constant' ) array([-0.24197145, 0. , 0.24197145]) >>> when it should be [ 0.24197145, 0. , -0.24197145]) (notice the change in the sign of coefficients) Or did I get that wrong? alex. |