discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Embedded python block in grc will not accept vectors


From: Edward Miles
Subject: [Discuss-gnuradio] Embedded python block in grc will not accept vectors
Date: Mon, 10 Oct 2016 10:49:36 -0700

Hello, my name is Edward and I have a quick question about the embedded python block found in the Misc section of the gnuradio-companion(grc). When I go into the block's properties and open its code in the editor I want to change this line of code:

gr.sync_block.__init__(
            self,
            name='Embedded Python Block',   # will show up in GRC
            in_sig=[np.complex64],
            out_sig=[np.complex64]
        )

to this:

gr.sync_block.__init__(
            self,
            name='Embedded Python Block',   # will show up in GRC
            in_sig=[(np.complex64, 1024)],      # changed to accept a vector of size 1024 as its input
            out_sig=[(np.complex64, 1024)]     # changed to output a vector of size 1024
        )

This change should allow the block to take in a vector of size 1024 as input and also output a vector of size 1024. I've made new modules and blocks in python using the gr_modtool and this line of code works fine but does not seem to work in the embedded python block in grc. The block keeps giving this error:

Param - Code(_source_code):
Invalid conversion specification

I've tried looking into the issue to see if it is just a problem with this particular block or if there is a special conversion that needs to be done specifically and I can't seem to find anything on it. I could just make the block using gr_modtool but it would make life much easier if I could implement it with the embedded python block. So my question is has anyone else encountered this problem and knows how to get the block to accept vectors? Any input would be greatly appreciated. Thank you all for your time and consideration.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]