Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread George Edwards
Hi Tim,

Thanks for your suggestion! I just tried it and it does not work. The
Python OOT def __init__(self, ) method requires that one fills in in_sig
= xxx and out_sig = xxx.
I tried your suggestion above for variable number of inputs and set:
in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)]

and I leave the yml file as is when I had the static number of inputs (in_sig
= [complex64, complex64, complex64]) shown below
inputs:
-  domain:  stream
   dtype:  complex
   multiplicity:  '3'
It gives a TypeError: data type not understood
I tried a bunch of combinations based on the above change you suggested,
but GRC kept failing when I tried to run it.!

Thanks again for your suggestion!
Regards,
George



On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins 
wrote:

> George,
>
> I would recommend taking a look at some of the existing blocks that have
> variable inputs to accomplish this (especially for the YML file). A YML
> example for a variable input can be found here:
>
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
>
> I haven't run a test using this line in a python block yet, but two
> different examples are shown below that I believe should work (or should
> with some minor tweaks). The first doesn't limit the number of inputs while
> the second one does (at 8).
>
> gr.io_signature(1, -1, gr.sizeof_gr_complex))
>
> gr.io_signature(1, 8, gr.sizeof_float)
>
> I don't know if there is a complete python reference for GNURadio 3.8, but
> this should be helpful to get you close as well:
> https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
>
> Good luck,
>
> Tim
>
> On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hi Gavin,
>
> Thanks for the information!
>
> Does this mean that if I wanted 3 inputs and 5 outputs and all floating
> point values, then inside the Python code, I simply set
>  in_sig = [numpy.float32]
>  out_sign = [numpy.float32]
>
> And, in the yml file I set:
> inputs:
> -  domain:  stream
>dtype:  float
>multiplicity:  '3'
>
> outputs:
> -domain:  stream
>  dtype:  float
>  multiplicity:  '5'
>
> Would this be correct?
> Thanks again for your help!
>
> Regards,
> George
>
> On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs 
> wrote:
>
> In 3.7, you would use the  tag, but in 3.8 the trick to setting
> multiple ins/outs in the YML file, is the keyword "multiplicity". You can
> see the details of how to configure here:
> https://wiki.gnuradio.org/index.php/YAML_GRC
>
> YAML GRC - GNU Radio 
> Starting with release 3.8, YAML replaces XML as the file format for GNU
> Radio Companion. This is triggered by switching from Cheetah to Mako as the
> templating engine, since Cheetah does not support Python 3.
> wiki.gnuradio.org
>
>


Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread Tim Huggins
 I do not believe that you want to encapsulate the call with [ ], even so there 
may be an issue with that command. I am unsure what the issue is but when I 
make the call:

in_sig = gr.io_signature(3,3, gr.sizeof_gr_complex)
The error message is: Can't create an instance of your block: object of type 
'io_signature_sptr' has no len()

Instead try this:
    in_sig = 3*[np.complex64],
Where 3 will end up being your variable for number of inputs.
Tim

On Thursday, February 4, 2021, 1:23:35 PM EST, George Edwards 
 wrote:  
 
 Hi Tim,
Thanks for your suggestion! I just tried it and it does not work. The Python 
OOT def __init__(self, ) method requires that one fills in in_sig = xxx and 
out_sig = xxx.I tried your suggestion above for variable number of inputs and 
set:in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)] 
and I leave the yml file as is when I had the static number of inputs (in_sig = 
[complex64, complex64, complex64]) shown below inputs:-      domain:  stream    
   dtype:  complex       multiplicity:  '3'It gives a TypeError: data type not 
understoodI tried a bunch of combinations based on the above change you 
suggested, but GRC kept failing when I tried to run it.!
Thanks again for your suggestion!Regards,George


On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins  wrote:

 George,
I would recommend taking a look at some of the existing blocks that have 
variable inputs to accomplish this (especially for the YML file). A YML example 
for a variable input can be found here:
https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
I haven't run a test using this line in a python block yet, but two different 
examples are shown below that I believe should work (or should with some minor 
tweaks). The first doesn't limit the number of inputs while the second one does 
(at 8).
gr.io_signature(1, -1, gr.sizeof_gr_complex)) gr.io_signature(1, 8, 
gr.sizeof_float)I don't know if there is a complete python reference for 
GNURadio 3.8, but this should be helpful to get you close as well: 
https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
Good luck,
Tim

On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards 
 wrote:  
 
 Hi Gavin,
Thanks for the information!
Does this mean that if I wanted 3 inputs and 5 outputs and all floating point 
values, then inside the Python code, I simply set  in_sig = [numpy.float32] 
out_sign = [numpy.float32]
And, in the yml file I set:inputs:-      domain:  stream       dtype:  float    
   multiplicity:  '3'
outputs: -        domain:  stream         dtype:  float         multiplicity:  
'5'
Would this be correct?Thanks again for your help!
Regards,George
On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs  wrote:

In 3.7, you would use the  tag, but in 3.8 the trick to setting 
multiple ins/outs in the YML file, is the keyword "multiplicity". You can see 
the details of how to configure 
here:https://wiki.gnuradio.org/index.php/YAML_GRC


| YAML GRC - GNU RadioStarting with release 3.8, YAML replaces XML as the file 
format for GNU Radio Companion. This is triggered by switching from Cheetah to 
Mako as the templating engine, since Cheetah does not support Python 
3.wiki.gnuradio.org |



  
  

Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread Jeff Long
The examples you can search for in the code base (recommend you do this)
show syntax such as

def __init__(self, input_rate, sps):
gr.hier_block2.__init__(self, "atsc_rx",
gr.io_signature(1, 1,
gr.sizeof_gr_complex), # Input signature
gr.io_signature(1, 1, gr.sizeof_char))
  # Output signature


On Thu, Feb 4, 2021 at 1:58 PM George Edwards 
wrote:

> Hi Tim,
>
> Thanks for your suggestion! I just tried it and it does not work. The
> Python OOT def __init__(self, ) method requires that one fills in in_sig
> = xxx and out_sig = xxx.
> I tried your suggestion above for variable number of inputs and set:
> in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)]
>
> and I leave the yml file as is when I had the static number of inputs (in_sig
> = [complex64, complex64, complex64]) shown below
> inputs:
> -  domain:  stream
>dtype:  complex
>multiplicity:  '3'
> It gives a TypeError: data type not understood
> I tried a bunch of combinations based on the above change you suggested,
> but GRC kept failing when I tried to run it.!
>
> Thanks again for your suggestion!
> Regards,
> George
>
>
>
> On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins 
> wrote:
>
>> George,
>>
>> I would recommend taking a look at some of the existing blocks that have
>> variable inputs to accomplish this (especially for the YML file). A YML
>> example for a variable input can be found here:
>>
>>
>> https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
>>
>> I haven't run a test using this line in a python block yet, but two
>> different examples are shown below that I believe should work (or should
>> with some minor tweaks). The first doesn't limit the number of inputs while
>> the second one does (at 8).
>>
>> gr.io_signature(1, -1, gr.sizeof_gr_complex))
>>
>> gr.io_signature(1, 8, gr.sizeof_float)
>>
>> I don't know if there is a complete python reference for GNURadio 3.8,
>> but this should be helpful to get you close as well:
>> https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
>>
>> Good luck,
>>
>> Tim
>>
>> On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards <
>> gedwards@gmail.com> wrote:
>>
>>
>> Hi Gavin,
>>
>> Thanks for the information!
>>
>> Does this mean that if I wanted 3 inputs and 5 outputs and all floating
>> point values, then inside the Python code, I simply set
>>  in_sig = [numpy.float32]
>>  out_sign = [numpy.float32]
>>
>> And, in the yml file I set:
>> inputs:
>> -  domain:  stream
>>dtype:  float
>>multiplicity:  '3'
>>
>> outputs:
>> -domain:  stream
>>  dtype:  float
>>  multiplicity:  '5'
>>
>> Would this be correct?
>> Thanks again for your help!
>>
>> Regards,
>> George
>>
>> On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs 
>> wrote:
>>
>> In 3.7, you would use the  tag, but in 3.8 the trick to setting
>> multiple ins/outs in the YML file, is the keyword "multiplicity". You
>> can see the details of how to configure here:
>> https://wiki.gnuradio.org/index.php/YAML_GRC
>>
>> YAML GRC - GNU Radio 
>> Starting with release 3.8, YAML replaces XML as the file format for GNU
>> Radio Companion. This is triggered by switching from Cheetah to Mako as the
>> templating engine, since Cheetah does not support Python 3.
>> wiki.gnuradio.org
>>
>>


Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread Jeff Long
The line

  in_sig = gr.io_signature(3,3, gr.sizeof_gr_complex)

just worked for me on both 3.8 and master. Are you using an older version?

On Thu, Feb 4, 2021 at 2:48 PM Tim Huggins 
wrote:

> I do not believe that you want to encapsulate the call with [ ], even so
> there may be an issue with that command. I am unsure what the issue is but
> when I make the call:
>
> in_sig = gr.io_signature(3,3, gr.sizeof_gr_complex)
>
> The error message is: Can't create an instance of your block: object of
> type 'io_signature_sptr' has no len()
>
> Instead try this:
>
> in_sig = 3*[np.complex64],
>
> Where 3 will end up being your variable for number of inputs.
>
> Tim
>
> On Thursday, February 4, 2021, 1:23:35 PM EST, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hi Tim,
>
> Thanks for your suggestion! I just tried it and it does not work. The
> Python OOT def __init__(self, ) method requires that one fills in in_sig
> = xxx and out_sig = xxx.
> I tried your suggestion above for variable number of inputs and set:
> in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)]
>
> and I leave the yml file as is when I had the static number of inputs (in_sig
> = [complex64, complex64, complex64]) shown below
> inputs:
> -  domain:  stream
>dtype:  complex
>multiplicity:  '3'
> It gives a TypeError: data type not understood
> I tried a bunch of combinations based on the above change you suggested,
> but GRC kept failing when I tried to run it.!
>
> Thanks again for your suggestion!
> Regards,
> George
>
>
>
> On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins 
> wrote:
>
> George,
>
> I would recommend taking a look at some of the existing blocks that have
> variable inputs to accomplish this (especially for the YML file). A YML
> example for a variable input can be found here:
>
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
>
> I haven't run a test using this line in a python block yet, but two
> different examples are shown below that I believe should work (or should
> with some minor tweaks). The first doesn't limit the number of inputs while
> the second one does (at 8).
>
> gr.io_signature(1, -1, gr.sizeof_gr_complex))
>
> gr.io_signature(1, 8, gr.sizeof_float)
>
> I don't know if there is a complete python reference for GNURadio 3.8, but
> this should be helpful to get you close as well:
> https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
>
> Good luck,
>
> Tim
>
> On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hi Gavin,
>
> Thanks for the information!
>
> Does this mean that if I wanted 3 inputs and 5 outputs and all floating
> point values, then inside the Python code, I simply set
>  in_sig = [numpy.float32]
>  out_sign = [numpy.float32]
>
> And, in the yml file I set:
> inputs:
> -  domain:  stream
>dtype:  float
>multiplicity:  '3'
>
> outputs:
> -domain:  stream
>  dtype:  float
>  multiplicity:  '5'
>
> Would this be correct?
> Thanks again for your help!
>
> Regards,
> George
>
> On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs 
> wrote:
>
> In 3.7, you would use the  tag, but in 3.8 the trick to setting
> multiple ins/outs in the YML file, is the keyword "multiplicity". You can
> see the details of how to configure here:
> https://wiki.gnuradio.org/index.php/YAML_GRC
>
> YAML GRC - GNU Radio 
> Starting with release 3.8, YAML replaces XML as the file format for GNU
> Radio Companion. This is triggered by switching from Cheetah to Mako as the
> templating engine, since Cheetah does not support Python 3.
> wiki.gnuradio.org
>
>


Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread Jeff Long
This does appear to be broken for embedded python blocks. GRC assumes the
list style of signature. I'll put in an issue describing this.

On Thu, Feb 4, 2021 at 3:15 PM Tim Huggins 
wrote:

> I am using 3.8.2 and was trying to quickly test it in an embedded python
> block (the block was displaying that error). If I get a chance I'll compare
> with a full OOT block.
>
> On Thursday, February 4, 2021, 3:06:58 PM EST, Jeff Long <
> willco...@gmail.com> wrote:
>
>
> The line
>
>   in_sig = gr.io_signature(3,3, gr.sizeof_gr_complex)
>
> just worked for me on both 3.8 and master. Are you using an older version?
>
> On Thu, Feb 4, 2021 at 2:48 PM Tim Huggins 
> wrote:
>
> I do not believe that you want to encapsulate the call with [ ], even so
> there may be an issue with that command. I am unsure what the issue is but
> when I make the call:
>
> in_sig = gr.io_signature(3,3, gr.sizeof_gr_complex)
>
> The error message is: Can't create an instance of your block: object of
> type 'io_signature_sptr' has no len()
>
> Instead try this:
>
> in_sig = 3*[np.complex64],
>
> Where 3 will end up being your variable for number of inputs.
>
> Tim
>
> On Thursday, February 4, 2021, 1:23:35 PM EST, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hi Tim,
>
> Thanks for your suggestion! I just tried it and it does not work. The
> Python OOT def __init__(self, ) method requires that one fills in in_sig
> = xxx and out_sig = xxx.
> I tried your suggestion above for variable number of inputs and set:
> in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)]
>
> and I leave the yml file as is when I had the static number of inputs (in_sig
> = [complex64, complex64, complex64]) shown below
> inputs:
> -  domain:  stream
>dtype:  complex
>multiplicity:  '3'
> It gives a TypeError: data type not understood
> I tried a bunch of combinations based on the above change you suggested,
> but GRC kept failing when I tried to run it.!
>
> Thanks again for your suggestion!
> Regards,
> George
>
>
>
> On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins 
> wrote:
>
> George,
>
> I would recommend taking a look at some of the existing blocks that have
> variable inputs to accomplish this (especially for the YML file). A YML
> example for a variable input can be found here:
>
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
>
> I haven't run a test using this line in a python block yet, but two
> different examples are shown below that I believe should work (or should
> with some minor tweaks). The first doesn't limit the number of inputs while
> the second one does (at 8).
>
> gr.io_signature(1, -1, gr.sizeof_gr_complex))
>
> gr.io_signature(1, 8, gr.sizeof_float)
>
> I don't know if there is a complete python reference for GNURadio 3.8, but
> this should be helpful to get you close as well:
> https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
>
> Good luck,
>
> Tim
>
> On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hi Gavin,
>
> Thanks for the information!
>
> Does this mean that if I wanted 3 inputs and 5 outputs and all floating
> point values, then inside the Python code, I simply set
>  in_sig = [numpy.float32]
>  out_sign = [numpy.float32]
>
> And, in the yml file I set:
> inputs:
> -  domain:  stream
>dtype:  float
>multiplicity:  '3'
>
> outputs:
> -domain:  stream
>  dtype:  float
>  multiplicity:  '5'
>
> Would this be correct?
> Thanks again for your help!
>
> Regards,
> George
>
> On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs 
> wrote:
>
> In 3.7, you would use the  tag, but in 3.8 the trick to setting
> multiple ins/outs in the YML file, is the keyword "multiplicity". You can
> see the details of how to configure here:
> https://wiki.gnuradio.org/index.php/YAML_GRC
>
> YAML GRC - GNU Radio 
> Starting with release 3.8, YAML replaces XML as the file format for GNU
> Radio Companion. This is triggered by switching from Cheetah to Mako as the
> templating engine, since Cheetah does not support Python 3.
> wiki.gnuradio.org
>
>


Re: 3.9 Setup for OOT development

2021-02-04 Thread Gavin Jacobs
I made some progress on this and now I have my OOT module/block working on 
Ubuntu 20.4, GNU Radio 3.9, written in C++, with callbacks and variable # of 
inputs.

There are two key things to report.
First is the workflow. None of the tutorials on the wiki (that I found) were 
complete, but eventually I got it working as follows:

cd 
gr_modtool newmod
/* < choose modulename > */
cd gr-modulename
gr_modtool add
/* < answer questions about blockname > */
/* < edit files:
./include/modulename/blockname.h
./lib/blockname_impl.h
./lib/blockname_impl.cc
./grc/modulename_blockname.block.yml
   > */
gr_modtool bind blockname
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

NB - the 'bind' step must be done AFTER you edit the blockname.h file, and 
BEFORE you run cmake. So, if you make a mistake in the blockname.h file, you 
have to delete the build directory and go back to the bind step in the above 
sequence.

Second, the description of how to configure the yml file did not address 
variable number of inputs, nor callbacks. Here is a working example that shows 
both:

id: stream_select
label: Select
category: '[Stream]'

templates:
  imports: import stream
  make: stream.select(${qty}, ${ins})
  callbacks:
  - set_ins(${ins})

#  Make one 'parameters' list entry for every parameter you want settable from 
the GUI.
# Keys include:
# * id (makes the value accessible as keyname, e.g. in the make entry)
# * label (label shown in the GUI)
# * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)
parameters:
- id: qty
  label: 'Number of Inputs'
  dtype: int
  default: 2

- id: ins
  label: 'Input Selector'
  dtype: int
  default: 0

#  Make one 'inputs' list entry per input and one 'outputs' list entry per 
output.
#  Keys include:
#  * label (an identifier for the GUI)
#  * domain (optional - stream or message. Default is stream)
#  * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)
#  * vlen (optional - data stream vector length. Default is 1)
#  * optional (optional - set to 1 for optional inputs. Default is 0)
inputs:
- label: in
  dtype: float
  multiplicity: ${ qty }

outputs:
- label: out
  dtype: float

#  'file_format' specifies the version of the GRC yml format used in the file
#  and should usually not be changed.
file_format: 1

NB - I should have used a better id for the second parameter (ins) - do not 
confuse that with the in and out definitions.

Hope that helps,
Gavin






Re: 3.9 Setup for OOT development

2021-02-04 Thread Ron Economos
If you're converting from GNU Radio 3.7, you can automatically convert 
your .xml files into .yml files with the command:



gr_modtool update --complete


Just run it in the old OOT directory and copy over the .yml files to 
your new OOT. It does a very good (although not always perfect) job of 
converting.



Ron


On 2/4/21 14:37, Gavin Jacobs wrote:
I made some progress on this and now I have my OOT module/block 
working on Ubuntu 20.4, GNU Radio 3.9, written in C++, with callbacks 
and variable # of inputs.


There are two key things to report.
First is the workflow. None of the tutorials on the wiki (that I 
found) were complete, but eventually I got it working as follows:


cd 
gr_modtool newmod
/* < choose modulename > */
cd gr-modulename
gr_modtool add
/* < answer questions about blockname > */
/* < edit files:
    ./include/modulename/blockname.h
    ./lib/blockname_impl.h
    ./lib/blockname_impl.cc
    ./grc/modulename_blockname.block.yml
   > */
gr_modtool bind blockname
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

NB - the 'bind' step must be done AFTER you edit the blockname.h file, 
and BEFORE you run cmake. So, if you make a mistake in the blockname.h 
file, you have to delete the build directory and go back to the bind 
step in the above sequence.


Second, the description of how to configure the yml file did not 
address variable number of inputs, nor callbacks. Here is a working 
example that shows both:


id: stream_select
label: Select
category: '[Stream]'

templates:
  imports: import stream
  make: stream.select(${qty}, ${ins})
  callbacks:
  - set_ins(${ins})

#  Make one 'parameters' list entry for every parameter you want 
settable from the GUI.

#     Keys include:
#     * id (makes the value accessible as keyname, e.g. in the make entry)
#     * label (label shown in the GUI)
#     * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)
parameters:
- id: qty
  label: 'Number of Inputs'
  dtype: int
  default: 2

- id: ins
  label: 'Input Selector'
  dtype: int
  default: 0

#  Make one 'inputs' list entry per input and one 'outputs' list entry 
per output.

#  Keys include:
#      * label (an identifier for the GUI)
#      * domain (optional - stream or message. Default is stream)
#      * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)
#      * vlen (optional - data stream vector length. Default is 1)
#      * optional (optional - set to 1 for optional inputs. Default is 0)
inputs:
- label: in
  dtype: float
  multiplicity: ${ qty }

outputs:
- label: out
  dtype: float

#  'file_format' specifies the version of the GRC yml format used in 
the file

#  and should usually not be changed.
file_format: 1

NB - I should have used a better id for the second parameter (ins) - 
do not confuse that with the in and out definitions.


Hope that helps,
Gavin






Re: How to set variable number of inputs/outputs in Python OOT modules

2021-02-04 Thread George Edwards
Hello Jeff,

Thanks! I kept playing with it and got it to work.

Regards,
George

On Thu, Feb 4, 2021 at 1:54 PM Jeff Long  wrote:

> The examples you can search for in the code base (recommend you do this)
> show syntax such as
>
> def __init__(self, input_rate, sps):
> gr.hier_block2.__init__(self, "atsc_rx",
> gr.io_signature(1, 1,
> gr.sizeof_gr_complex), # Input signature
> gr.io_signature(1, 1, gr.sizeof_char))
>   # Output signature
>
>
> On Thu, Feb 4, 2021 at 1:58 PM George Edwards 
> wrote:
>
>> Hi Tim,
>>
>> Thanks for your suggestion! I just tried it and it does not work. The
>> Python OOT def __init__(self, ) method requires that one fills in in_sig
>> = xxx and out_sig = xxx.
>> I tried your suggestion above for variable number of inputs and set:
>> in_sig = [gr.io_signature(1, -1, gr.sizeof_gr_complex)]
>>
>> and I leave the yml file as is when I had the static number of inputs (in_sig
>> = [complex64, complex64, complex64]) shown below
>> inputs:
>> -  domain:  stream
>>dtype:  complex
>>multiplicity:  '3'
>> It gives a TypeError: data type not understood
>> I tried a bunch of combinations based on the above change you suggested,
>> but GRC kept failing when I tried to run it.!
>>
>> Thanks again for your suggestion!
>> Regards,
>> George
>>
>>
>>
>> On Thu, Feb 4, 2021 at 8:01 AM Tim Huggins 
>> wrote:
>>
>>> George,
>>>
>>> I would recommend taking a look at some of the existing blocks that have
>>> variable inputs to accomplish this (especially for the YML file). A YML
>>> example for a variable input can be found here:
>>>
>>>
>>> https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_multiply_xx.block.yml
>>>
>>> I haven't run a test using this line in a python block yet, but two
>>> different examples are shown below that I believe should work (or should
>>> with some minor tweaks). The first doesn't limit the number of inputs while
>>> the second one does (at 8).
>>>
>>> gr.io_signature(1, -1, gr.sizeof_gr_complex))
>>>
>>> gr.io_signature(1, 8, gr.sizeof_float)
>>>
>>> I don't know if there is a complete python reference for GNURadio 3.8,
>>> but this should be helpful to get you close as well:
>>> https://www.gnuradio.org/doc/sphinx-v3.7.9.2/
>>>
>>> Good luck,
>>>
>>> Tim
>>>
>>> On Thursday, February 4, 2021, 12:01:07 AM EST, George Edwards <
>>> gedwards@gmail.com> wrote:
>>>
>>>
>>> Hi Gavin,
>>>
>>> Thanks for the information!
>>>
>>> Does this mean that if I wanted 3 inputs and 5 outputs and all floating
>>> point values, then inside the Python code, I simply set
>>>  in_sig = [numpy.float32]
>>>  out_sign = [numpy.float32]
>>>
>>> And, in the yml file I set:
>>> inputs:
>>> -  domain:  stream
>>>dtype:  float
>>>multiplicity:  '3'
>>>
>>> outputs:
>>> -domain:  stream
>>>  dtype:  float
>>>  multiplicity:  '5'
>>>
>>> Would this be correct?
>>> Thanks again for your help!
>>>
>>> Regards,
>>> George
>>>
>>> On Wed, Feb 3, 2021 at 5:26 PM Gavin Jacobs 
>>> wrote:
>>>
>>> In 3.7, you would use the  tag, but in 3.8 the trick to setting
>>> multiple ins/outs in the YML file, is the keyword "multiplicity". You
>>> can see the details of how to configure here:
>>> https://wiki.gnuradio.org/index.php/YAML_GRC
>>>
>>> YAML GRC - GNU Radio 
>>> Starting with release 3.8, YAML replaces XML as the file format for GNU
>>> Radio Companion. This is triggered by switching from Cheetah to Mako as the
>>> templating engine, since Cheetah does not support Python 3.
>>> wiki.gnuradio.org
>>>
>>>