2007/7/24, Eric Blossom <[EMAIL PROTECTED]>: > On Tue, Jul 24, 2007 at 12:36:10PM +0200, Vincenzo Pellegrini wrote: > > thanks Trond, > > I went your way, and actually my stream gets loaded right into the ram > > as I wanted..:) > > my problem is now that.. doing: > > > > data = fromfile("/root/Desktop/ofdm_encode_1H.dump", > > dtype="complex64") > > vector_source = gr.vector_source_c(data,True) > > > > self.connect(vector_source,gain) > > self.connect (gain, self.u) > > > > I get an error relating to the number of arguments I pass to > > gr.vector_source_c > > > > vector_source = gr.vector_source_c(data,True) > > File > > "/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_gengen.py", > > line 6695, in vector_source_c > > return _gnuradio_swig_py_gengen.vector_source_c(*args) > > NotImplementedError: Wrong number of arguments for overloaded function > > 'vector_source_c'. > > Possible C/C++ prototypes are: > > > > gr_make_vector_source_c(std::vector<gr_complex,std::allocator<gr_complex > > > > const &,bool) > > > > gr_make_vector_source_c(std::vector<gr_complex,std::allocator<gr_complex > > > > const &) > > > > > > what am I doing wrong? > > > > sorry for bothering.. > > and thanks for help > > > > vincenzo > > What is the type of the "data" result?
The type of data is a numpy array. It can be converted to an ordinary python list: a_list = data.tolist() However, whenever a list is expected, a numpy array can always be used. > vector_source_c expects a Python list or tuple of complex. -- Trond Danielsen _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio