File tree 2 files changed +25
-28
lines changed
2 files changed +25
-28
lines changed Original file line number Diff line number Diff line change @@ -123,13 +123,10 @@ def all_arithmetic_operators(request):
123
123
return request .param
124
124
125
125
126
- # use sorted as dicts in py<3.6 have random order, which xdist doesn't like
127
- _cython_table = sorted (((key , value ) for key , value in
128
- pd .core .base .SelectionMixin ._cython_table .items ()),
129
- key = lambda x : x [0 ].__name__ )
126
+ _cython_table = pd .core .base .SelectionMixin ._cython_table .items ()
130
127
131
128
132
- @pytest .fixture (params = _cython_table )
129
+ @pytest .fixture (params = list ( _cython_table ) )
133
130
def cython_table_items (request ):
134
131
return request .param
135
132
Original file line number Diff line number Diff line change 23
23
import pandas .core .nanops as nanops
24
24
import pandas ._libs .lib as lib
25
25
from pandas .compat .numpy import function as nv
26
- from pandas .compat import PYPY
26
+ from pandas .compat import PYPY , OrderedDict
27
27
from pandas .util ._decorators import (Appender , cache_readonly ,
28
28
deprecate_kwarg , Substitution )
29
29
@@ -179,28 +179,28 @@ class SelectionMixin(object):
179
179
_selection = None
180
180
_internal_names = ['_cache' , '__setstate__' ]
181
181
_internal_names_set = set (_internal_names )
182
- _builtin_table = {
183
- builtins .sum : np .sum ,
184
- builtins .max : np .max ,
185
- builtins .min : np .min
186
- }
187
- _cython_table = {
188
- builtins .sum : 'sum' ,
189
- builtins .max : 'max' ,
190
- builtins .min : 'min' ,
191
- np .all : 'all' ,
192
- np .any : 'any' ,
193
- np .sum : 'sum' ,
194
- np .mean : 'mean' ,
195
- np .prod : 'prod' ,
196
- np .std : 'std' ,
197
- np .var : 'var' ,
198
- np .median : 'median' ,
199
- np .max : 'max' ,
200
- np .min : 'min' ,
201
- np .cumprod : 'cumprod' ,
202
- np .cumsum : 'cumsum'
203
- }
182
+ _builtin_table = OrderedDict ((
183
+ ( builtins .sum , np .sum ) ,
184
+ ( builtins .max , np .max ) ,
185
+ ( builtins .min , np .min ),
186
+ ))
187
+ _cython_table = OrderedDict ((
188
+ ( builtins .sum , 'sum' ) ,
189
+ ( builtins .max , 'max' ) ,
190
+ ( builtins .min , 'min' ) ,
191
+ ( np .all , 'all' ) ,
192
+ ( np .any , 'any' ) ,
193
+ ( np .sum , 'sum' ) ,
194
+ ( np .mean , 'mean' ) ,
195
+ ( np .prod , 'prod' ) ,
196
+ ( np .std , 'std' ) ,
197
+ ( np .var , 'var' ) ,
198
+ ( np .median , 'median' ) ,
199
+ ( np .max , 'max' ) ,
200
+ ( np .min , 'min' ) ,
201
+ ( np .cumprod , 'cumprod' ) ,
202
+ ( np .cumsum , 'cumsum' ),
203
+ ))
204
204
205
205
@property
206
206
def _selection_name (self ):
You can’t perform that action at this time.
0 commit comments