Skip to content

Commit d5cc7cd

Browse files
committed
MAINT: Move ma benchmarks to new file
1 parent 19a90d0 commit d5cc7cd

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

benchmarks/benchmarks/bench_core.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,6 @@ def time_large2(self):
9696
(self.alarge + self.blarge) - 2
9797

9898

99-
class MA(Benchmark):
100-
def setup(self):
101-
self.l100 = range(100)
102-
self.t100 = ([True] * 100)
103-
104-
def time_masked_array(self):
105-
np.ma.masked_array()
106-
107-
def time_masked_array_l100(self):
108-
np.ma.masked_array(self.l100)
109-
110-
def time_masked_array_l100_t100(self):
111-
np.ma.masked_array(self.l100, self.t100)
112-
113-
11499
class CorrConv(Benchmark):
115100
params = [[50, 1000, 1e5],
116101
[10, 100, 1000, 1e4],

benchmarks/benchmarks/bench_ma.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from __future__ import absolute_import, division, print_function
2+
3+
from .common import Benchmark
4+
5+
import numpy as np
6+
7+
8+
class MA(Benchmark):
9+
def setup(self):
10+
self.l100 = range(100)
11+
self.t100 = ([True] * 100)
12+
13+
def time_masked_array(self):
14+
np.ma.masked_array()
15+
16+
def time_masked_array_l100(self):
17+
np.ma.masked_array(self.l100)
18+
19+
def time_masked_array_l100_t100(self):
20+
np.ma.masked_array(self.l100, self.t100)

0 commit comments

Comments
 (0)