From 3a60d1fe80a405cf8e344d1d00f370ac735a5a24 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Tue, 16 Feb 2021 13:52:25 +0000 Subject: [PATCH] Backport PR #39795: fix benchmark failure with numpy 1.20+ --- asv_bench/benchmarks/series_methods.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asv_bench/benchmarks/series_methods.py b/asv_bench/benchmarks/series_methods.py index 9f3689779d056..2a239204e4c01 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 @@ -122,6 +124,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)