|
From: | George Edwards |
Subject: | Re: Problem with the OOT forecast() method in Python |
Date: | Wed, 12 Oct 2022 17:00:58 -0600 |
The last one looks correct, and would not have given the error you mention above. What happened?On Wed, Oct 12, 2022 at 4:49 PM George Edwards <gedwards.eng@gmail.com> wrote:Hi Jeff, thank you very much for the response.I tries:ninput_items_required[0]=[noutput_items]ninput_items_required=[noutput_items]andreturn [noutput_items]None of these worked for me.RegardsGeorgeOn Wed, Oct 12, 2022, 8:07 AM Jeff Long <willcode4@gmail.com> wrote:For Python, the forecast() function should return a list, containing the number of items required for each input.On Wed, Oct 12, 2022 at 8:08 AM George Edwards <gedwards.eng@gmail.com> wrote:Hello GNURadio Community,I am getting a TypeError when I fill in the code in the forecast() method in my Gnuradio OOT block design. I know, if I want to interpolate or decimate, I can simply pick the block type in the gr_modtool design menu, however, I would like to develop the capability to design my own. Here is how I fill in the forecast() method in Python to do either decimation or interpolation:ninput_items_required[0] = noutput_items*self.sps # for decimationORninput_items_required[0] = noutput_items/self.sps # for interpolationOn running the flowgraph in GRC Console I see TypeError: 'int' object does not support item assignment.Will appreciate any suggestion to fix this problem.George
[Prev in Thread] | Current Thread | [Next in Thread] |