Hello GNURadio Community,

I wrote a Python OOT block that takes a vector input and outputs a vector
of the same size.

In the grc, my OOT block is preceeded by a stream to vector and followed by
a  vector to stream (I specify the vector number items in both blocks as
well as the yml for my Python OOT). My problem lies in the input/output
specification that I am unable to figure out.

First I specified the input/output profile as:
in_sig = [np.float32*vectlen],
out_sig =  [np.float32*vectlen])
The OOT compiled, but when I ran the grc, it showed that the * breaks the
code.
Next I tried:
in_sig = [(np.float32, vectlen)],
out_sig =  [(np.float32, vectlen)])
The grc plot for the output came up, but did not work. So I put in some
print statements in the work() function after the following lines:
in0 = input_items[0]
out = output_items[0]
print("length of input data: {}".format(len(in0))
for i in range (0, vectlen):
     print(" Iteration i = {}".format(i))
     out[i] = in0[i]

The printed results in the grc were:
length of input data:  4   definitely an indication of error
For the Iterations it printed i = 0,1,2,3,4 and broke with an Error stating
index 4 is out of bound for axis 0.
Obviously, my input/output profile specification must be the problem.

I will appreciate any help or suggestions.

Thank you!
George

Reply via email to