I have been looking for ways to transfer matrix data from one block to another. I was wondering if it's possible to do the same. What I've thought of till now is converting the numpy matrix to a list, and sending the list through after padding it with the number of rows and columns in the end. After receiving, just reshape the list to a numpy matrix and process as required. But from what I understand, the length of a list must be known while making the blocks.
I'd like to know if it's possible to implement this, or if I'll have to look at it in some other way.
GNU Radio doesn't care what your items actually represent, only their size in bytes.
Therefore, you can define arbitrary item sizes, and put multiple numbers in one item. In fact, what the stream_to_vector and vector_to_stream do is exactly that.
You'd use a output_signature = gr.io_signature(1,1, [gr.sizeofgr_complex] * N_elements)
with N_elements being your number of matrix entries.
As a side note: exchanging matrices does reek of things of channel estimates or equalization; these are often more elegantly handled by asynchronous message passing than item streams.