@@ -1297,14 +1297,14 @@ def reindex_indexer(
12971297 raise IndexError ("Requested axis not found in manager" )
12981298
12991299 if axis == 0 :
1300- new_blocks = self ._slice_take_blocks_ax0 (indexer , fill_tuple = ( fill_value ,) )
1300+ new_blocks = self ._slice_take_blocks_ax0 (indexer , fill_value = fill_value )
13011301 else :
13021302 new_blocks = [
13031303 blk .take_nd (
13041304 indexer ,
13051305 axis = axis ,
1306- fill_tuple = (
1307- fill_value if fill_value is not None else blk .fill_value ,
1306+ fill_value = (
1307+ fill_value if fill_value is not None else blk .fill_value
13081308 ),
13091309 )
13101310 for blk in self .blocks
@@ -1315,7 +1315,7 @@ def reindex_indexer(
13151315
13161316 return type (self ).from_blocks (new_blocks , new_axes )
13171317
1318- def _slice_take_blocks_ax0 (self , slice_or_indexer , fill_tuple = None ):
1318+ def _slice_take_blocks_ax0 (self , slice_or_indexer , fill_value = lib . no_default ):
13191319 """
13201320 Slice/take blocks along axis=0.
13211321
@@ -1325,7 +1325,7 @@ def _slice_take_blocks_ax0(self, slice_or_indexer, fill_tuple=None):
13251325 -------
13261326 new_blocks : list of Block
13271327 """
1328- allow_fill = fill_tuple is not None
1328+ allow_fill = fill_value is not lib . no_default
13291329
13301330 sl_type , slobj , sllen = _preprocess_slice_or_indexer (
13311331 slice_or_indexer , self .shape [0 ], allow_fill = allow_fill
@@ -1337,16 +1337,15 @@ def _slice_take_blocks_ax0(self, slice_or_indexer, fill_tuple=None):
13371337 if sl_type in ("slice" , "mask" ):
13381338 return [blk .getitem_block (slobj , new_mgr_locs = slice (0 , sllen ))]
13391339 elif not allow_fill or self .ndim == 1 :
1340- if allow_fill and fill_tuple [ 0 ] is None :
1340+ if allow_fill and fill_value is None :
13411341 _ , fill_value = maybe_promote (blk .dtype )
1342- fill_tuple = (fill_value ,)
13431342
13441343 return [
13451344 blk .take_nd (
13461345 slobj ,
13471346 axis = 0 ,
13481347 new_mgr_locs = slice (0 , sllen ),
1349- fill_tuple = fill_tuple ,
1348+ fill_value = fill_value ,
13501349 )
13511350 ]
13521351
@@ -1369,8 +1368,7 @@ def _slice_take_blocks_ax0(self, slice_or_indexer, fill_tuple=None):
13691368 blocks = []
13701369 for blkno , mgr_locs in libinternals .get_blkno_placements (blknos , group = True ):
13711370 if blkno == - 1 :
1372- # If we've got here, fill_tuple was not None.
1373- fill_value = fill_tuple [0 ]
1371+ # If we've got here, fill_value was not lib.no_default
13741372
13751373 blocks .append (
13761374 self ._make_na_block (placement = mgr_locs , fill_value = fill_value )
@@ -1391,10 +1389,7 @@ def _slice_take_blocks_ax0(self, slice_or_indexer, fill_tuple=None):
13911389 else :
13921390 blocks .append (
13931391 blk .take_nd (
1394- blklocs [mgr_locs .indexer ],
1395- axis = 0 ,
1396- new_mgr_locs = mgr_locs ,
1397- fill_tuple = None ,
1392+ blklocs [mgr_locs .indexer ], axis = 0 , new_mgr_locs = mgr_locs ,
13981393 )
13991394 )
14001395
0 commit comments