@@ -528,8 +528,7 @@ def shape(self) -> tuple[int, ...]:
528
528
def get_duck_array (self ):
529
529
array = as_indexable (self .array )
530
530
array = array [self .key ]
531
- if not isinstance (self .array , IndexingAdapter ):
532
- array = array .get_duck_array ()
531
+ array = array .get_duck_array ()
533
532
return array
534
533
535
534
def transpose (self , order ):
@@ -1239,11 +1238,7 @@ def is_fancy_indexer(indexer: Any) -> bool:
1239
1238
return True
1240
1239
1241
1240
1242
- class IndexingAdapter :
1243
- pass
1244
-
1245
-
1246
- class NumpyIndexingAdapter (ExplicitlyIndexedNDArrayMixin , IndexingAdapter ):
1241
+ class NumpyIndexingAdapter (ExplicitlyIndexedNDArrayMixin ):
1247
1242
"""Wrap a NumPy array to use explicit indexing."""
1248
1243
1249
1244
__slots__ = ("array" ,)
@@ -1309,7 +1304,7 @@ def __init__(self, array):
1309
1304
self .array = array
1310
1305
1311
1306
1312
- class ArrayApiIndexingAdapter (ExplicitlyIndexedNDArrayMixin , IndexingAdapter ):
1307
+ class ArrayApiIndexingAdapter (ExplicitlyIndexedNDArrayMixin ):
1313
1308
"""Wrap an array API array to use explicit indexing."""
1314
1309
1315
1310
__slots__ = ("array" ,)
@@ -1352,7 +1347,7 @@ def transpose(self, order):
1352
1347
return xp .permute_dims (self .array , order )
1353
1348
1354
1349
1355
- class DaskIndexingAdapter (ExplicitlyIndexedNDArrayMixin , IndexingAdapter ):
1350
+ class DaskIndexingAdapter (ExplicitlyIndexedNDArrayMixin ):
1356
1351
"""Wrap a dask array to support explicit indexing."""
1357
1352
1358
1353
__slots__ = ("array" ,)
@@ -1428,7 +1423,7 @@ def transpose(self, order):
1428
1423
return self .array .transpose (order )
1429
1424
1430
1425
1431
- class PandasIndexingAdapter (ExplicitlyIndexedNDArrayMixin , IndexingAdapter ):
1426
+ class PandasIndexingAdapter (ExplicitlyIndexedNDArrayMixin ):
1432
1427
"""Wrap a pandas.Index to preserve dtypes and handle explicit indexing."""
1433
1428
1434
1429
__slots__ = ("array" , "_dtype" )
0 commit comments