[SciPy-User] firwin behavior

Warren Weckesser warren.weckesser@enthought....
Wed Aug 10 18:56:53 CDT 2011


On Wed, Aug 10, 2011 at 6:49 PM, Christopher Felton
<chris.felton@gmail.com>wrote:

> 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?
>


The result of division is a float.   Take a look here:
    http://docs.python.org/release/3.0.1/whatsnew/3.0.html#integers
and click on the "PEP 0238" link for all the details.

Warren



>
> Thanks,
> Chris
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110810/bee5913b/attachment.html 


More information about the SciPy-User mailing list