[SciPy-User] firwin behavior

Christopher Felton chris.felton@gmail....
Wed Aug 10 18:49:34 CDT 2011


On 8/10/11 4:02 PM, Warren Weckesser wrote:
> On Wed, Aug 10, 2011 at 3:16 PM, Christopher Felton
> <chris.felton@gmail.com>  wrote:
>> On 8/10/2011 8:14 AM, Jeff Alstott wrote:
>>> firwin is producing unreasonable filters for me, and I'm not sure if I'm
>>> misusing the code or if there is a bug. Like so:
>>>
>>> In [5]: from scipy.signal import firwin
>>>
>>> In [6]: ny = 500
>>>
>>> In [7]: f21f80= firwin(21, [1/ny, 80/ny]); plot(f21f80);
>>
>>
>> Is this a simple error, ny = 500 (integer) and 1/500 = 0, 80/500 = 0.
>
>
> Jeff said he is using Python 3, so the results of the divisions will be floats.
>
> Warren

Thanks for the correction Warren,

I know very little about Python3.  Is a float the default number type or 
is the result of the division a float?

Thanks,
Chris



More information about the SciPy-User mailing list