Skip to content

Commit

Permalink
TST: vbench for Index.__new__
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Nov 26, 2012
1 parent ae1b8a8 commit f3858fd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vb_suite/ctors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@
index = Index(np.arange(100))
"""

series_constructor_ndarray = \
ctor_series_ndarray = \
Benchmark("Series(data, index=index)", setup=setup,
name='series_constructor_ndarray')

setup = common_setup + """
arr = np.random.randn(100, 100)
"""

frame_constructor_ndarray = \
ctor_frame_ndarray = \
Benchmark("DataFrame(arr)", setup=setup,
name='frame_constructor_ndarray')

setup = common_setup + """
data = np.array(['foo', 'bar', 'baz'], dtype=object)
"""

ctor_index_array_string = Benchmark('Index(data)', setup=setup)

0 comments on commit f3858fd

Please sign in to comment.