Skip to content

Commit c3d691a

Browse files
BENCH: update class SelectDtypes to allow testing against 1.3.x (#43269)
1 parent 08ac29a commit c3d691a

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

asv_bench/benchmarks/dtypes.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,26 @@ def time_pandas_dtype_invalid(self, dtype):
5050

5151
class SelectDtypes:
5252

53-
params = [
54-
tm.ALL_INT_NUMPY_DTYPES
55-
+ tm.ALL_INT_EA_DTYPES
56-
+ tm.FLOAT_NUMPY_DTYPES
57-
+ tm.COMPLEX_DTYPES
58-
+ tm.DATETIME64_DTYPES
59-
+ tm.TIMEDELTA64_DTYPES
60-
+ tm.BOOL_DTYPES
61-
]
53+
try:
54+
params = [
55+
tm.ALL_INT_NUMPY_DTYPES
56+
+ tm.ALL_INT_EA_DTYPES
57+
+ tm.FLOAT_NUMPY_DTYPES
58+
+ tm.COMPLEX_DTYPES
59+
+ tm.DATETIME64_DTYPES
60+
+ tm.TIMEDELTA64_DTYPES
61+
+ tm.BOOL_DTYPES
62+
]
63+
except AttributeError:
64+
params = [
65+
tm.ALL_INT_DTYPES
66+
+ tm.ALL_EA_INT_DTYPES
67+
+ tm.FLOAT_DTYPES
68+
+ tm.COMPLEX_DTYPES
69+
+ tm.DATETIME64_DTYPES
70+
+ tm.TIMEDELTA64_DTYPES
71+
+ tm.BOOL_DTYPES
72+
]
6273
param_names = ["dtype"]
6374

6475
def setup(self, dtype):

0 commit comments

Comments
 (0)