diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-04-11 22:52:10 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-04-11 22:52:10 +0100 |
commit | d5cc7cdc8df4ce8a4c2b9a3b5ba7a09cfadb249d (patch) | |
tree | fa4745bf4a5d26cf5a7b815be943ba962d00311b /benchmarks | |
parent | 19a90d06289d7117ba6531cbc532ea5db7b44073 (diff) | |
download | numpy-d5cc7cdc8df4ce8a4c2b9a3b5ba7a09cfadb249d.tar.gz |
MAINT: Move ma benchmarks to new file
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/benchmarks/bench_core.py | 15 | ||||
-rw-r--r-- | benchmarks/benchmarks/bench_ma.py | 20 |
2 files changed, 20 insertions, 15 deletions
diff --git a/benchmarks/benchmarks/bench_core.py b/benchmarks/benchmarks/bench_core.py index bab0ff4e6..a0de81054 100644 --- a/benchmarks/benchmarks/bench_core.py +++ b/benchmarks/benchmarks/bench_core.py @@ -96,21 +96,6 @@ class Temporaries(Benchmark): (self.alarge + self.blarge) - 2 -class MA(Benchmark): - def setup(self): - self.l100 = range(100) - self.t100 = ([True] * 100) - - def time_masked_array(self): - np.ma.masked_array() - - def time_masked_array_l100(self): - np.ma.masked_array(self.l100) - - def time_masked_array_l100_t100(self): - np.ma.masked_array(self.l100, self.t100) - - class CorrConv(Benchmark): params = [[50, 1000, 1e5], [10, 100, 1000, 1e4], diff --git a/benchmarks/benchmarks/bench_ma.py b/benchmarks/benchmarks/bench_ma.py new file mode 100644 index 000000000..d36bfabcd --- /dev/null +++ b/benchmarks/benchmarks/bench_ma.py @@ -0,0 +1,20 @@ +from __future__ import absolute_import, division, print_function + +from .common import Benchmark + +import numpy as np + + +class MA(Benchmark): + def setup(self): + self.l100 = range(100) + self.t100 = ([True] * 100) + + def time_masked_array(self): + np.ma.masked_array() + + def time_masked_array_l100(self): + np.ma.masked_array(self.l100) + + def time_masked_array_l100_t100(self): + np.ma.masked_array(self.l100, self.t100) |