summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-08-06 01:09:43 +0200
committerMarcus Müller <marcus@hostalia.de>2018-08-17 19:59:23 +0200
commit48d535e9d9d95524b2c8ed35b44c7eda541aea68 (patch)
treea4511ac107e9d7ebb4b650dbd5ea8fb63e67d0a6 /gnuradio-runtime/lib/math
parent6bfe4661a87cb7fc5f47ec219e89f8e6215bd03f (diff)
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
Diffstat (limited to 'gnuradio-runtime/lib/math')
-rw-r--r--gnuradio-runtime/lib/math/gen_sine_table.py2
1 files changed, 1 insertions, 1 deletions
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