From 3a6ff21b7568fab787aaf3a9b98638ec9147d399 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 13 Feb 2021 15:03:17 +0000 Subject: [PATCH 1/2] fix benchmark failure with numpy 1.20+ --- asv_bench/benchmarks/series_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asv_bench/benchmarks/series_methods.py b/asv_bench/benchmarks/series_methods.py index b457bce8fe138..e09f572750864 100644 --- a/asv_bench/benchmarks/series_methods.py +++ b/asv_bench/benchmarks/series_methods.py @@ -135,7 +135,7 @@ def time_isin_long_series_long_values_floats(self): class IsInLongSeriesLookUpDominates: params = [ - ["int64", "int32", "float64", "float32", "object", "Int64", "Float64"], + ["int64", "int32", "float64", "float32", "object"], [5, 1000], ["random_hits", "random_misses", "monotone_hits", "monotone_misses"], ] From 9bc7955b38faa51994371400b3f2eb2cd6237a8f Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Tue, 16 Feb 2021 11:12:03 +0000 Subject: [PATCH 2/2] instead raise a NotImplementedError --- asv_bench/benchmarks/series_methods.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/asv_bench/benchmarks/series_methods.py b/asv_bench/benchmarks/series_methods.py index e09f572750864..b8f6cb53987b8 100644 --- a/asv_bench/benchmarks/series_methods.py +++ b/asv_bench/benchmarks/series_methods.py @@ -2,6 +2,8 @@ import numpy as np +from pandas.compat.numpy import np_version_under1p20 + from pandas import Categorical, NaT, Series, date_range from .pandas_vb_common import tm @@ -135,7 +137,7 @@ def time_isin_long_series_long_values_floats(self): class IsInLongSeriesLookUpDominates: params = [ - ["int64", "int32", "float64", "float32", "object"], + ["int64", "int32", "float64", "float32", "object", "Int64", "Float64"], [5, 1000], ["random_hits", "random_misses", "monotone_hits", "monotone_misses"], ] @@ -143,6 +145,10 @@ class IsInLongSeriesLookUpDominates: def setup(self, dtype, MaxNumber, series_type): N = 10 ** 7 + + if not np_version_under1p20 and dtype in ("Int64", "Float64"): + raise NotImplementedError + if series_type == "random_hits": np.random.seed(42) array = np.random.randint(0, MaxNumber, N)