[Numpy-discussion] Problem with correlate?
Hanno Klemm
klemm@phys.ethz...
Fri Aug 22 02:44:05 CDT 2008
Hi Stefan,
yes, indeed, that's what I thought. This result is odd. Has correlate
been changed since version 1.0.4, or should I submit this as a bug?
Best regards,
Hanno
Stéfan van der Walt <stefan@sun.ac.za> said:
> ------=_Part_25307_10322093.1219268954678
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> 2008/8/20 Hanno Klemm <klemm@phys.ethz.ch>:
> > In [29]: x =3D array([0.,0.,1, 0, 0])
> > In [35]: y1 =3D array([1,0,0,0,0])
> >
> > In [36]: correlate(x,y1,mode=3D'full')
> > Out[36]: array([ 0., 0., 0., 0., 0., 0., 1., 0., 0.])
>
> That doesn't look right. Under r5661:
>
> In [60]: np.convolve([0, 0, 1, 0, 0], [1, 0, 0, 0, 0], mode=3D'f')
> Out[60]: array([0, 0, 1, 0, 0, 0, 0, 0, 0])
>
> Regards
> St=E9fan
>
> ------=_Part_25307_10322093.1219268954678
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> <div dir=3D"ltr">2008/8/20 Hanno Klemm <<a
href=3D"mailto:klemm@phys.eth=
> z.ch">klemm@phys.ethz.ch</a>>:<br>> In [29]: x =3D
array([0.,0.,1, 0,=
> 0])<br>> In [35]: y1 =3D array([1,0,0,0,0])<br>><br>> In
[36]: co=
> rrelate(x,y1,mode=3D'full')<br>
> > Out[36]: array([ 0., 0., 0., 0., 0.,
0.,=
> 1., 0., 0.])<br><br>That doesn't look
right. U=
> nder r5661:<br><br>In [60]: np.convolve([0, 0, 1, 0, 0], [1, 0, 0,
0, 0], m=
> ode=3D'f')<br>Out[60]: array([0, 0, 1, 0, 0, 0, 0, 0, 0])<br>
> <br>Regards<br>St=E9fan<br><br></div>
>
> ------=_Part_25307_10322093.1219268954678--
>
--
Hanno Klemm
klemm@phys.ethz.ch
More information about the Numpy-discussion
mailing list