|
1 |
| -from .pandas_vb_common import * |
| 1 | +import numpy as np |
2 | 2 |
|
| 3 | +from .pandas_vb_common import Panel, setup # noqa |
3 | 4 |
|
4 |
| -class PanelMethods(object): |
5 |
| - goal_time = 0.2 |
6 |
| - |
7 |
| - def setup(self): |
8 |
| - self.index = date_range(start='2000', freq='D', periods=1000) |
9 |
| - self.panel = Panel(np.random.randn(100, len(self.index), 1000)) |
10 | 5 |
|
11 |
| - def time_pct_change_items(self): |
12 |
| - self.panel.pct_change(1, axis='items') |
| 6 | +class PanelMethods(object): |
13 | 7 |
|
14 |
| - def time_pct_change_major(self): |
15 |
| - self.panel.pct_change(1, axis='major') |
| 8 | + goal_time = 0.2 |
| 9 | + params = ['items', 'major', 'minor'] |
| 10 | + param_names = ['axis'] |
16 | 11 |
|
17 |
| - def time_pct_change_minor(self): |
18 |
| - self.panel.pct_change(1, axis='minor') |
| 12 | + def setup(self, axis): |
| 13 | + self.panel = Panel(np.random.randn(100, 1000, 100)) |
19 | 14 |
|
20 |
| - def time_shift(self): |
21 |
| - self.panel.shift(1) |
| 15 | + def time_pct_change(self, axis): |
| 16 | + self.panel.pct_change(1, axis=axis) |
22 | 17 |
|
23 |
| - def time_shift_minor(self): |
24 |
| - self.panel.shift(1, axis='minor') |
| 18 | + def time_shift(self, axis): |
| 19 | + self.panel.shift(1, axis=axis) |
0 commit comments