diff options
author | Josh Morman <mormjb@gmail.com> | 2020-04-23 08:12:30 -0400 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:47 -0400 |
commit | 5039f381454bc0afc4f676085afa998c438e02e7 (patch) | |
tree | 4cd97bfcd6e4959d255961422e3841dc35f0a892 /gr-digital/python/digital/qa_chunks_to_symbols.py | |
parent | 3e4df0bcccc58a2f283268828f9ad2dc3eadb19d (diff) |
digital: add pybind11 bindings
Diffstat (limited to 'gr-digital/python/digital/qa_chunks_to_symbols.py')
-rw-r--r-- | gr-digital/python/digital/qa_chunks_to_symbols.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gr-digital/python/digital/qa_chunks_to_symbols.py b/gr-digital/python/digital/qa_chunks_to_symbols.py index 8cb7371a84..0fbbc679ca 100644 --- a/gr-digital/python/digital/qa_chunks_to_symbols.py +++ b/gr-digital/python/digital/qa_chunks_to_symbols.py @@ -24,8 +24,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): const = [ 1+0j, 0+1j, -1+0j, 0-1j] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (1+0j, 0+1j, -1+0j, 0-1j, - 0-1j, -1+0j, 0+1j, 1+0j) + expected_result = [1+0j, 0+1j, -1+0j, 0-1j, + 0-1j, -1+0j, 0+1j, 1+0j] src = blocks.vector_source_b(src_data) op = digital.chunks_to_symbols_bc(const) @@ -41,8 +41,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): def test_bf_002(self): const = [-3, -1, 1, 3] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (-3, -1, 1, 3, - 3, 1, -1, -3) + expected_result = [-3, -1, 1, 3, + 3, 1, -1, -3] src = blocks.vector_source_b(src_data) op = digital.chunks_to_symbols_bf(const) @@ -59,8 +59,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): const = [ 1+0j, 0+1j, -1+0j, 0-1j] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (1+0j, 0+1j, -1+0j, 0-1j, - 0-1j, -1+0j, 0+1j, 1+0j) + expected_result = [1+0j, 0+1j, -1+0j, 0-1j, + 0-1j, -1+0j, 0+1j, 1+0j] src = blocks.vector_source_i(src_data) op = digital.chunks_to_symbols_ic(const) @@ -76,8 +76,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): def test_if_004(self): const = [-3, -1, 1, 3] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (-3, -1, 1, 3, - 3, 1, -1, -3) + expected_result = [-3, -1, 1, 3, + 3, 1, -1, -3] src = blocks.vector_source_i(src_data) op = digital.chunks_to_symbols_if(const) @@ -94,8 +94,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): const = [ 1+0j, 0+1j, -1+0j, 0-1j] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (1+0j, 0+1j, -1+0j, 0-1j, - 0-1j, -1+0j, 0+1j, 1+0j) + expected_result = [1+0j, 0+1j, -1+0j, 0-1j, + 0-1j, -1+0j, 0+1j, 1+0j] src = blocks.vector_source_s(src_data) op = digital.chunks_to_symbols_sc(const) @@ -111,8 +111,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): def test_sf_006(self): const = [-3, -1, 1, 3] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (-3, -1, 1, 3, - 3, 1, -1, -3) + expected_result = [-3, -1, 1, 3, + 3, 1, -1, -3] src = blocks.vector_source_s(src_data) op = digital.chunks_to_symbols_sf(const) @@ -129,10 +129,10 @@ class test_chunks_to_symbols(gr_unittest.TestCase): def test_sf_callback(self): constA = [-3, -1, 1, 3] constB = [12, -12, 6, -6] - src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result=(12, -12, 6, -6, -6, 6, -12, 12) + src_data = [0, 1, 2, 3, 3, 2, 1, 0] + expected_result=[12, -12, 6, -6, -6, 6, -12, 12] - src = blocks.vector_source_s(src_data, False, 1, "") + src = blocks.vector_source_s(src_data, False, 1, []) op = digital.chunks_to_symbols_sf(constA) op.set_symbol_table(constB) dst = blocks.vector_sink_f() @@ -145,10 +145,10 @@ class test_chunks_to_symbols(gr_unittest.TestCase): def test_sc_callback(self): constA = [-3.0+1j, -1.0-1j, 1.0+1j, 3-1j] constB = [12.0+1j, -12.0-1j, 6.0+1j, -6-1j] - src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result=(12.0+1j, -12.0-1j, 6.0+1j, -6-1j, -6-1j, 6+1j, -12-1j, 12+1j) + src_data = [0, 1, 2, 3, 3, 2, 1, 0] + expected_result=[12.0+1j, -12.0-1j, 6.0+1j, -6-1j, -6-1j, 6+1j, -12-1j, 12+1j] - src = blocks.vector_source_s(src_data, False, 1, "") + src = blocks.vector_source_s(src_data, False, 1, []) op = digital.chunks_to_symbols_sc(constA) op.set_symbol_table(constB) dst = blocks.vector_sink_c() @@ -162,8 +162,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): constA = [-3.0, -1.0, 1.0, 3] constB = [12.0, -12.0, 6.0, -6] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (-3, -1, 1, 3, - -6, 6, -12, 12) + expected_result = [-3, -1, 1, 3, + -6, 6, -12, 12] first_tag = gr.tag_t() first_tag.key = pmt.intern("set_symbol_table") first_tag.value = pmt.init_f32vector(len(constA), constA) @@ -188,8 +188,8 @@ class test_chunks_to_symbols(gr_unittest.TestCase): constA = [-3.0+1j, -1.0-1j, 1.0+1j, 3-1j] constB = [12.0+1j, -12.0-1j, 6.0+1j, -6-1j] src_data = (0, 1, 2, 3, 3, 2, 1, 0) - expected_result = (-3+1j, -1-1j, 1+1j, 3-1j, - -6-1j, 6+1j, -12-1j, 12+1j) + expected_result = [-3+1j, -1-1j, 1+1j, 3-1j, + -6-1j, 6+1j, -12-1j, 12+1j] first_tag = gr.tag_t() first_tag.key = pmt.intern("set_symbol_table") first_tag.value = pmt.init_c32vector(len(constA), constA) |