discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Changing data type of custom block


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Changing data type of custom block
Date: Thu, 8 Mar 2018 13:02:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/12/2018 06:21 PM, Tellrell White wrote:
> Hello All
> I have a custom sink block that I want to be able to a vector input of
> length 1024, however, I can't seem to change the data type of the block.
> The code I'm using is the following in which the data type is float and
> I've made the vector length equal to 1024, a parameter. The flow graph
> is attached.
> 
> 
> def __init__(self, num_values=1024, V_len=1024):
>         gr.basic_block.__init__(self,
>             name="ED_block",
>             in_sig=[(np.float, V_len)],
>             out_sig=[])
>         self.V_len = V_len
>         self.num_values = num_values
>         self.seen = 0  

Check which types Numpy actually supports. For example, real signals are
'np.float32'.

-- M



reply via email to

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