[SciPy-User] [SciPy-user] help about lfilter ????
josef.pktd at gmail.com
josef.pktd at gmail.com
Thu Jan 28 20:10:40 EST 2010
On Thu, Jan 28, 2010 at 7:51 PM, persia <m.abdollahi at gmail.com> wrote:
>
> lfilter is the linear filtering function in the scipy.signal module. can
> someone tell me what is wrong with this function please ?
>
> I used this function in the following way and it gave me that error !! :
>
> In [204]:
> lfilter(array([1,2,3]),array([-4,5,6]),array([9,8,7,6,5,4,3,2,1]),zi=array([0,0]))
> ---------------------------------------------------------------------------
> <type 'exceptions.ValueError'> Traceback (most recent call last)
>
>
>
> <type 'exceptions.ValueError'>: linear_filter not available for this type
>
>
> why is it so ??!!!! what is wrong with this "type " ? what is it meant by
> this type anyway ?! i tried with the same arguments in matlab with the
> corresponding function and it worked !!
> and if i multiply the second argument vector say by .4, this will happen :
>
> lfilter(array([1,2,3]),.4*array([-4,5,6]),array([9,8,7,6,5,4,3,2,1]),zi=array([0,0]))
>
>
> (array([ -5.625 , -23.28125 , -68.7890625 , -148.40820312,
> -312.44384766, -633.16711426, -1276.37466431, -2557.71900177,
> -5120.46074867]),
> array([-10242.1544385 , -7682.56612301]))
>
>
> see ? no problem then ?!! isnt this wierd ? please help !
it looks like lfilter doesn't like integers
>>> signal.lfilter(array([1,2,3]),array([-4.,5,6]),array([9,8,7,6,5,4,3,2,1]),zi=array([0,0]))
(array([ -2.25 , -9.3125 , -27.515625 , -59.36328125,
-124.97753906, -253.2668457 , -510.54986572, -1023.08760071,
-2048.18429947]), array([-4096.8617754, -3073.0264492]))
note I only changed a 4 to 4.
can you file a ticket?
Josef
>
> thanx
> --
> View this message in context: http://old.nabble.com/help-about-lfilter------tp27363601p27363601.html
> Sent from the Scipy-User mailing list archive at Nabble.com.
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list