diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-08-24 23:00:55 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-11-02 22:15:53 +0100 |
commit | 797994a11ac5ec6bee9ea01c092947d0c34115f1 (patch) | |
tree | 7381f53008ba56e6b93398fa92be482d12da4f43 /gnuradio-runtime/examples | |
parent | e07751acc8424f4dd987f79c32dd247ed347902c (diff) |
Replace scipy/pylab where numpy/pyplot is sufficient
This should reduce the number of times users are prompted to install
pylab || scipy when they'd actually get away with functionality fully
contained in numpy and matplotlib.
This only solves the obvious cases. There's some usage of `pylab.mlab`
that would need more than 20s of consideration.
Diffstat (limited to 'gnuradio-runtime/examples')
-rw-r--r-- | gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py index 603c2ae5c3..bce09400b6 100644 --- a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py +++ b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py @@ -5,12 +5,7 @@ from __future__ import unicode_literals from gnuradio import gr from gnuradio import blocks import math, sys, os, time - -try: - import scipy -except ImportError: - sys.stderr.write("Unable to import Scipy (www.scipy.org)\n") - sys.exit(1) +import numpy try: import sqlite3 @@ -165,8 +160,8 @@ def format_results(kernel, times): ''' res = dict() res["kernel"] = kernel - res["avg"] = scipy.mean(times) - res["var"] = scipy.var(times) + res["avg"] = numpy.mean(times) + res["var"] = numpy.var(times) res["max"] = max(times) res["min"] = min(times) return res |