[SciPy-Dev] Strange code in scipy.signal.decimate
Paul Hobson
pmhobson at gmail.com
Thu Oct 18 18:30:24 EDT 2018
If you make the changes and run the test suite, do the pertinent tests pass?
-Paul
On Thu, Oct 18, 2018 at 2:49 PM Daniele Nicolodi <daniele at grinta.net> wrote:
> On 18-10-2018 15:28, Paul Hobson wrote:
> > Dan,
> >
> > I might be missing something, but dlti returns a subclass of
> > LinearTimeInvariant. Point is, it's not a tuple, but a class with
> > multiple attributes and method. Simple tuple unpacking won't likely work
> > unless the authors of LinearTimeInvariant really went out of their way
> > to make it so.
>
> The point is not to go through the `dlti` class at all.
>
> Please look at the replacement code I posted: it works.
>
> Cheers,
> Dan
>
> > -Paul
> >
> > On Thu, Oct 18, 2018 at 1:58 PM Daniele Nicolodi <daniele at grinta.net
> > <mailto:daniele at grinta.net>> wrote:
> >
> > Hello,
> >
> > I was having a look at the scipy.signal.decimate() function and I
> > noticed some strange looking code:
> >
> > elif ftype == 'iir':
> > if n is None:
> > n = 8
> > system = dlti(*cheby1(n, 0.05, 0.8 / q))
> > b, a = system.num, system.den
> >
> > This is used to setup the anti aliasing low pass filter. What I don't
> > understand is the dance to obtain the IIR numerator and denominator
> > coefficients. Couldn't the above be simply as the code below?
> >
> > elif ftype == 'iir':
> > if n is None:
> > n = 8
> > b, a = cheby1(n, 0.05, 0.8 / q)
> >
> > Am I missing something?
> >
> > Thanks!
> >
> > Cheers,
> > Dan
> > _______________________________________________
> > SciPy-Dev mailing list
> > SciPy-Dev at python.org <mailto:SciPy-Dev at python.org>
> > https://mail.python.org/mailman/listinfo/scipy-dev
> >
> >
> >
> > _______________________________________________
> > SciPy-Dev mailing list
> > SciPy-Dev at python.org
> > https://mail.python.org/mailman/listinfo/scipy-dev
> >
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20181018/19b0cfb5/attachment.html>
More information about the SciPy-Dev
mailing list