Hello All,

I am trying to write a python block that will convert shorts to complex int16, 
and I am having some difficulties. I have a need for this block so that I can 
read int16 data from a file using the file source block, and then transmit that 
data to a USRP X310 using a UHD USRP sink using complex int16 input type.

The problem I am having is being able to set out_sig within the block init to a 
numpy dtype representation of complex int16. I tried using the following: 
np.dtype([('re', np.int16), ('im', np.int16)]). I get the following error when 
using this: Can't map dtype([('re', '<i2'), ('im', '<i2')]) to GRC port type.

Does anyone know of a way to set the out_sig in a python block to a complex 
int16 type that will map to the complex int16 GRC port type? I figure this must 
be doable if the UHD USRP blocks have complex int16 GRC port types.

Best Regards,
Jerrid

Reply via email to