diff options
author | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
commit | e76d04ca2f4f15e3b1a1ab2a81dd52c4e6d2472c (patch) | |
tree | 1d86f68fceed9cd7204d9a79e816dc06c15feaf4 /gr-blocks/python/blocks/qa_peak_detector2.py | |
parent | 98348e37209aa7daeb96fe5ead815e5b083dc6da (diff) | |
parent | 39311758cb1e6a7424d3213b3eb2c65c8c4dcfe1 (diff) |
Move from SWIG to Pybind11
Goodbye, and thanks for all the fish, SWIG.
Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
Diffstat (limited to 'gr-blocks/python/blocks/qa_peak_detector2.py')
-rw-r--r-- | gr-blocks/python/blocks/qa_peak_detector2.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gr-blocks/python/blocks/qa_peak_detector2.py b/gr-blocks/python/blocks/qa_peak_detector2.py index eeb234aff8..5c19a2f0ae 100644 --- a/gr-blocks/python/blocks/qa_peak_detector2.py +++ b/gr-blocks/python/blocks/qa_peak_detector2.py @@ -24,11 +24,11 @@ class test_peak_detector2(gr_unittest.TestCase): tb = self.tb n=10 - data = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,)+n*(0,) + data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,]+n*[0,] - expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)+n*(0,) + expected_result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]+n*[0,] src = blocks.vector_source_f(data, False) @@ -48,11 +48,11 @@ class test_peak_detector2(gr_unittest.TestCase): tb = self.tb n=10 - data = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,)+n*(0,) + data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,]+n*[0,] - expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)+n*(0,) + expected_result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]+n*[0,] src = blocks.vector_source_f(data, False) @@ -76,8 +76,8 @@ class test_peak_detector2(gr_unittest.TestCase): l = 8100 m = 100 n = 10 - data = l*(0,)+ (10,)+ m*(0,)+(100,)+ n*(0,) - expected_result = l*(0,)+ (0,)+ m*(0,)+(1,)+ n*(0,) + data = l*[0,]+ [10,]+ m*[0,]+[100,]+ n*[0,] + expected_result = l*[0,]+ [0,]+ m*[0,]+[1,]+ n*[0,] src = blocks.vector_source_f(data, False) @@ -100,8 +100,8 @@ class test_peak_detector2(gr_unittest.TestCase): l = 8100 m = 100 n = 10 - data = l*(0,)+ (10,)+ m*(0,)+(100,)+ n*(0,) - expected_result = l*(0,)+ (0,)+ m*(0,)+(1,)+ n*(0,) + data = l*[0,]+ [10,]+ m*[0,]+[100,]+ n*[0,] + expected_result = l*[0,]+ [0,]+ m*[0,]+[1,]+ n*[0,] src = blocks.vector_source_f(data, False) |