[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] numpy to blob

From: Peter Horvath
Subject: [Discuss-gnuradio] numpy to blob
Date: Sun, 11 Aug 2013 16:19:19 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8


in pmt_to_python.py, 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.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]