From 48d535e9d9d95524b2c8ed35b44c7eda541aea68 Mon Sep 17 00:00:00 2001 From: Andrej Rode <mail@andrejro.de> Date: Mon, 6 Aug 2018 01:09:43 +0200 Subject: python: replace unfunctional old_div with functional code a previous change to py3k introduced synactically incorrect `old_div` function calls. A replacement with `//` and `/` where applicable is more appropriate. Eventually `from __future__ import division` needs to be added as well to have the "real" division also for integer values in python closes #1902 --- gnuradio-runtime/lib/math/gen_sine_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnuradio-runtime/lib/math/gen_sine_table.py') diff --git a/gnuradio-runtime/lib/math/gen_sine_table.py b/gnuradio-runtime/lib/math/gen_sine_table.py index 75e3a0c58f..5b459fa1a3 100644 --- a/gnuradio-runtime/lib/math/gen_sine_table.py +++ b/gnuradio-runtime/lib/math/gen_sine_table.py @@ -41,7 +41,7 @@ def gen_approx_table (f, nentries, min_x, max_x): a = (i * incx) + min_x b = ((i + 1) * incx) + min_x m = (f(b)-f(a)) / (b-a) - c = (3*a+b)*(f(a)-f(b))/(4*(b-a)) + (f(old_div((a+b) / 2) + f(a)),2) + c = (3*a+b)*(f(a)-f(b))/(4*(b-a)) + (f((a+b)/2) + f(a))//2 abs_error = c+m*a-f(a) r.append ((m, c, abs_error)) return r -- cgit v1.2.3