Hi,
This is a piece of code in my project I need help and
clarification on.
fg = gr.flow_graph()
…
mult1 = gr.multiply_ff()
fg.connect(src, (mult1, 0))
fg.connect(cos_wav, (mult1, 1))
gate_I = gr.vector_sink_f()
fg.connect (mult1, gate_I)
I_data = numpy.array(gate_I.data())
I am using numpy.array to get an array on which I need to do some
operations like sum() etc. If I am executing this code in the pycrust
interpreter line by line, I am able to get the data in I_data. But when
I write the same code in a .py file and execute, I am not getting any
data.
Even if I copy these set of lines and execute in pycrust using the
‘paste plus’ option, this doesn’t workout.
In my code, I need to convert a gr.float vector to an numpy array and
the array (or list) back to gr.float vector (using
gr.vector_source_f()). Please let me know why this problems happen and
the precautions to be taken while doing such data type conversions.
Thanks a lot.
Regards,
N Sivaram