I am trying to write a custom GNU Radio block in Python. I have an array of bytes which I am trying to output so it can be written to the file via the file sink block.
When I simply set the output_items to be the data I want to be outputted:
output_items[0] = np.array(data,dtype=np.int8)
It does not work, the file is not the output.
When I do a loop over the size of the output_items, it works fine:
for i in range(len(output_items[0])):
output_items[0][i] = 0
This works. Is there a way to specify the size of the output_items array I want? I thought I could accomplish this by returning the output size of the array but it did not work.