Forum: GNU Radio numpy to blob

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Peter Horvath (Guest)
on 2013-08-11 23:20
(Received via mailing list)

in, there is the following function:

def numpy_to_blob(p):
    p = p.view(np.uint8)
    b = pmt.make_blob(len(p))
    pmt.blob_data(b)[:] = p
    return b

What is the assumed input here? It doesn't seem to work with an ordinary
1D NumPy uint8 array. The pmt.make_blob() function wants to behave like
a C++ function, and expects two arguments, address and array length.

What is the best way to convert NumPy arrays to blobs?

(grextras and all the other stuff Josh was pointing to a couple of days
ago seem to have gone from github.)
This topic is locked and can not be replied to.