discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Float is required error for customized Block


From: Kevin Reid
Subject: Re: [Discuss-gnuradio] Float is required error for customized Block
Date: Wed, 3 Jan 2018 11:39:40 -0500

On Wed, Jan 3, 2018 at 7:47 AM, Tellrell White <address@hidden> wrote:
I made two edits to the code. I took out float() and took Gilad's suggestion to use np.log10() which operates on a list. Making these changes results in the following error

 c = np.log10(in1)         #converts 1024 values stored in in1 to dB and stores them in c
AttributeError: log10
thread[thread-per-block[8]: <block ED_block (22)>]: caught unrecognized exception

I'm assuming its because of the size of the values.

No, the size is irrelevant. In Python, "AttributeError: log10" means that there is no attribute "log10" of some object — in this case presumably the "np" module object which you tried to get "log10" from using the _expression_ "np.log10". Why this is so, I don't know, since it works for me at least in a regular interactive python:

>>> import numpy as np

>>> np.log10

<ufunc 'log10'>


But that is where to start troubleshooting.

reply via email to

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