Skip to content

Commit

Permalink
CLN: fix some issues in asv benchmark suite (pandas-dev#13630)
Browse files Browse the repository at this point in the history
* CLN: fix params list

* Fix issue in asv.conf.json for win32+other environment

Fix mistaken exclusion of virtualenv or existing:same on win32 in the config.

Credits: @pv

* CLN: remove DataMatrix

* ASV: fix exlusion of tables package for non-conda environments
  • Loading branch information
jorisvandenbossche authored Jul 14, 2016
1 parent 3f6d4bd commit c9a27ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 44 deletions.
6 changes: 3 additions & 3 deletions asv_bench/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
// On conda install pytables, otherwise tables
{"environment_type": "conda", "tables": ""},
{"environment_type": "conda", "pytables": null},
{"environment_type": "virtualenv", "tables": null},
{"environment_type": "virtualenv", "pytables": ""},
{"environment_type": "(?!conda).*", "tables": null},
{"environment_type": "(?!conda).*", "pytables": ""},
// On conda&win32, install libpython
{"sys_platform": "(?!win32).*", "libpython": ""},
{"sys_platform": "win32", "libpython": null},
{"environment_type": "conda", "sys_platform": "win32", "libpython": null},
{"environment_type": "(?!conda).*", "libpython": ""}
],
"include": [],
Expand Down
20 changes: 0 additions & 20 deletions asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@ def time_dataframe_getitem_scalar(self):
self.df[self.col][self.idx]


class datamatrix_getitem_scalar(object):
goal_time = 0.2

def setup(self):
try:
self.klass = DataMatrix
except:
self.klass = DataFrame
self.index = tm.makeStringIndex(1000)
self.columns = tm.makeStringIndex(30)
self.df = self.klass(np.random.rand(1000, 30), index=self.index, columns=self.columns)
self.idx = self.index[100]
self.col = self.columns[10]

def time_datamatrix_getitem_scalar(self):
self.df[self.col][self.idx]


class series_get_value(object):
goal_time = 0.2

Expand Down Expand Up @@ -498,5 +480,3 @@ def setup(self):

def time_float_loc(self):
self.ind.get_loc(0)


10 changes: 5 additions & 5 deletions asv_bench/benchmarks/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ class to_numeric(object):

param_names = ['data', 'downcast']
params = [
[(['1'] * N / 2) + ([2] * N / 2),
(['-1'] * N / 2) + ([2] * N / 2),
np.repeat(np.array('1970-01-01', '1970-01-02',
[(['1'] * (N / 2)) + ([2] * (N / 2)),
(['-1'] * (N / 2)) + ([2] * (N / 2)),
np.repeat(np.array(['1970-01-01', '1970-01-02'],
dtype='datetime64[D]'), N),
(['1.1'] * N / 2) + ([2] * N / 2),
([1] * N / 2) + ([2] * N / 2),
(['1.1'] * (N / 2)) + ([2] * (N / 2)),
([1] * (N / 2)) + ([2] * (N / 2)),
np.repeat(np.int32(1), N)],
[None, 'integer', 'signed', 'unsigned', 'float'],
]
Expand Down
16 changes: 0 additions & 16 deletions asv_bench/benchmarks/join_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ def setup(self):
self.df_multi = DataFrame(np.random.randn(len(self.index2), 4), index=self.index2, columns=['A', 'B', 'C', 'D'])
except:
pass
try:
self.DataFrame = DataMatrix
except:
pass
self.df = pd.DataFrame({'data1': np.random.randn(100000), 'data2': np.random.randn(100000), 'key1': self.key1, 'key2': self.key2, })
self.df_key1 = pd.DataFrame(np.random.randn(len(self.level1), 4), index=self.level1, columns=['A', 'B', 'C', 'D'])
self.df_key2 = pd.DataFrame(np.random.randn(len(self.level2), 4), index=self.level2, columns=['A', 'B', 'C', 'D'])
Expand Down Expand Up @@ -210,10 +206,6 @@ def setup(self):
self.df_multi = DataFrame(np.random.randn(len(self.index2), 4), index=self.index2, columns=['A', 'B', 'C', 'D'])
except:
pass
try:
self.DataFrame = DataMatrix
except:
pass
self.df = pd.DataFrame({'data1': np.random.randn(100000), 'data2': np.random.randn(100000), 'key1': self.key1, 'key2': self.key2, })
self.df_key1 = pd.DataFrame(np.random.randn(len(self.level1), 4), index=self.level1, columns=['A', 'B', 'C', 'D'])
self.df_key2 = pd.DataFrame(np.random.randn(len(self.level2), 4), index=self.level2, columns=['A', 'B', 'C', 'D'])
Expand Down Expand Up @@ -241,10 +233,6 @@ def setup(self):
self.df_multi = DataFrame(np.random.randn(len(self.index2), 4), index=self.index2, columns=['A', 'B', 'C', 'D'])
except:
pass
try:
self.DataFrame = DataMatrix
except:
pass
self.df = pd.DataFrame({'data1': np.random.randn(100000), 'data2': np.random.randn(100000), 'key1': self.key1, 'key2': self.key2, })
self.df_key1 = pd.DataFrame(np.random.randn(len(self.level1), 4), index=self.level1, columns=['A', 'B', 'C', 'D'])
self.df_key2 = pd.DataFrame(np.random.randn(len(self.level2), 4), index=self.level2, columns=['A', 'B', 'C', 'D'])
Expand Down Expand Up @@ -272,10 +260,6 @@ def setup(self):
self.df_multi = DataFrame(np.random.randn(len(self.index2), 4), index=self.index2, columns=['A', 'B', 'C', 'D'])
except:
pass
try:
self.DataFrame = DataMatrix
except:
pass
self.df = pd.DataFrame({'data1': np.random.randn(100000), 'data2': np.random.randn(100000), 'key1': self.key1, 'key2': self.key2, })
self.df_key1 = pd.DataFrame(np.random.randn(len(self.level1), 4), index=self.level1, columns=['A', 'B', 'C', 'D'])
self.df_key2 = pd.DataFrame(np.random.randn(len(self.level2), 4), index=self.level2, columns=['A', 'B', 'C', 'D'])
Expand Down

0 comments on commit c9a27ed

Please sign in to comment.