File tree 1 file changed +7
-3
lines changed
pandas/tests/extension/decimal
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 10
10
import pandas as pd
11
11
from pandas .api .extensions import register_extension_dtype
12
12
from pandas .core .arrays import ExtensionArray , ExtensionScalarOpsMixin
13
- from pandas .core .common import is_bool_indexer
14
13
from pandas .core .indexers import check_bool_array_indexer
15
14
16
15
@@ -111,8 +110,13 @@ def __getitem__(self, item):
111
110
if isinstance (item , numbers .Integral ):
112
111
return self ._data [item ]
113
112
else :
114
- if is_bool_indexer (item ):
115
- item = check_bool_array_indexer (self , item )
113
+ # array, slice.
114
+ if pd .api .types .is_list_like (item ):
115
+ if not pd .api .types .is_array_like (item ):
116
+ item = pd .array (item )
117
+ dtype = item .dtype
118
+ if pd .api .types .is_bool_dtype (dtype ):
119
+ item = check_bool_array_indexer (self , item )
116
120
return type (self )(self ._data [item ])
117
121
118
122
def take (self , indexer , allow_fill = False , fill_value = None ):
You can’t perform that action at this time.
0 commit comments