Skip to content

CLN: updates to benchmarks after repo reorg #16020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion asv_bench/benchmarks/binary_ops.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from .pandas_vb_common import *
import pandas.core.computation.expressions as expr
try:
import pandas.core.computation.expressions as expr
except ImportError:
import pandas.computation.expressions as expr


class Ops(object):
Expand Down
7 changes: 5 additions & 2 deletions asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from .pandas_vb_common import *
try:
from pandas.core.dtypes.concat import union_categoricals
from pandas.api.types import union_categoricals
except ImportError:
pass
try:
from pandas.types.concat import union_categoricals
except ImportError:
pass


class Categoricals(object):
Expand Down
5 changes: 4 additions & 1 deletion asv_bench/benchmarks/eval.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from .pandas_vb_common import *
import pandas as pd
import pandas.core.computation.expressions as expr
try:
import pandas.core.computation.expressions as expr
except ImportError:
import pandas.computation.expressions as expr


class Eval(object):
Expand Down
4 changes: 0 additions & 4 deletions asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from .pandas_vb_common import *
try:
import pandas.core.computation.expressions as expr
except:
expr = None


class Int64Indexing(object):
Expand Down
5 changes: 4 additions & 1 deletion asv_bench/benchmarks/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
except ImportError:
def date_range(start=None, end=None, periods=None, freq=None):
return DatetimeIndex(start, end, periods=periods, offset=freq)
from pandas.tools.plotting import andrews_curves
try:
from pandas.plotting import andrews_curves
except ImportError:
from pandas.tools.plotting import andrews_curves


class TimeseriesPlotting(object):
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/reshape.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .pandas_vb_common import *
from pandas.core.reshape import melt, wide_to_long
from pandas import melt, wide_to_long


class melt_dataframe(object):
Expand Down
6 changes: 2 additions & 4 deletions asv_bench/benchmarks/sparse.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from .pandas_vb_common import *
import pandas.core.sparse.series
import scipy.sparse
from pandas.core.sparse import SparseSeries, SparseDataFrame
from pandas.core.sparse import SparseDataFrame
from pandas import SparseSeries, SparseDataFrame


class sparse_series_to_frame(object):
Expand Down Expand Up @@ -37,7 +35,7 @@ def setup(self):
self.A = scipy.sparse.coo_matrix(([3.0, 1.0, 2.0], ([1, 0, 0], [0, 2, 3])), shape=(100, 100))

def time_sparse_series_from_coo(self):
self.ss = pandas.core.sparse.series.SparseSeries.from_coo(self.A)
self.ss = SparseSeries.from_coo(self.A)


class sparse_series_to_coo(object):
Expand Down
5 changes: 4 additions & 1 deletion asv_bench/benchmarks/timeseries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from pandas.tseries.converter import DatetimeConverter
try:
from pandas.plotting._converter import DatetimeConverter
except ImportError:
from pandas.tseries.converter import DatetimeConverter
from .pandas_vb_common import *
import pandas as pd
from datetime import timedelta
Expand Down