[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ImportError
From: |
Vasil Velichkov |
Subject: |
Re: ImportError |
Date: |
Wed, 3 Nov 2021 09:27:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
Hi Mario,
On 02/11/2021 21.17, Mario Moran wrote:
> It is not working but it is a different error now.
> Here it is:
> Traceback (most recent call last):
> File "/home/mariom/gr-tutorial/build/top_block.py", line 191, in <module>
> main()
> File "/home/mariom/gr-tutorial/build/top_block.py", line 167, in main
> tb = top_block_cls()
> File "/home/mariom/gr-tutorial/build/top_block.py", line 130, in __init__
> self.digital_chunks_to_symbols_xx_0 =
> digital.chunks_to_symbols_bc(1+1j, 1-1j, -1+1j, -1-1j, 1)
> TypeError: make() takes from 1 to 2 positional arguments but 5 were given
>
> I have my block, Chunks to Symbols, set up like this:
> inputtype: byte
> Output type: complex
> symbol table: 1+1j, 1-1j, -1+1j, -1-1j
You are missing the square brackets here, it should be: [1+1j, 1-1j, -1+1j,
-1-1j]
> dimensions: 1
> num ports 1
>
> From the tutorial the flowgraph, Here
> <https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_C%2B%2B>,
> it seems that the imaginary numbers are represented as 'j's instead of 'i's
> so I used 'j's was that correct or may I be missing a factor to make it
> work?
In Electronics 'i' is used to represent current and hence they use 'j' to
represent iota. Python adheres to this same convention, see
https://stackoverflow.com/a/24812657/2315085
Regards,
Vasil