|
From: | Marcus Müller |
Subject: | Re: Python tutorials |
Date: | Mon, 21 Aug 2023 08:37:54 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
Hi Shakti,
Hi Marcus,I got small doubt after looking at your reply, the self.consume takes (inputport , len(in0)) as arguments but the input length depends on the number of output_items / input_items as in0 = input_items[0][:len(output_items[0])] which inturn depends on the noutput_items / ninput_items variable , right?
No; you can consume as much as you have available input, or less, and you can produce as much as you have available output space, or less.
the sync block (see the "Block Types" document) is a special
case, where "producing N items" also means "consuming N items",
and the work function is always presented with the same amount of
input and output space.
My doubt is ,aren't the below functions in top_block.py define the default length of input vectors / value of ninput_items?
No, not at all.
Best regards,
Marcus
[Prev in Thread] | Current Thread | [Next in Thread] |