@@ -501,9 +501,7 @@ def _maybe_downcast(self, blocks: List["Block"], downcast=None) -> List["Block"]
501
501
502
502
# no need to downcast our float
503
503
# unless indicated
504
- if downcast is None and (
505
- self .is_float or self .is_timedelta or self .is_datetime
506
- ):
504
+ if downcast is None and (self .is_float or self .is_datelike ):
507
505
return blocks
508
506
509
507
return extend_blocks ([b .downcast (downcast ) for b in blocks ])
@@ -638,7 +636,7 @@ def astype(self, dtype, copy: bool = False, errors: str = "raise"):
638
636
if isinstance (values , np .ndarray ):
639
637
values = values .reshape (self .shape )
640
638
641
- newb = make_block (values , placement = self . mgr_locs , ndim = self . ndim )
639
+ newb = self . make_block (values )
642
640
643
641
if newb .is_numeric and self .is_numeric :
644
642
if newb .shape != self .shape :
@@ -2484,7 +2482,7 @@ def f(mask, val, idx):
2484
2482
blocks = self .split_and_operate (None , f , False )
2485
2483
else :
2486
2484
values = f (None , self .values .ravel (), None )
2487
- blocks = [make_block (values , ndim = self . ndim , placement = self . mgr_locs )]
2485
+ blocks = [self . make_block (values )]
2488
2486
2489
2487
return blocks
2490
2488
0 commit comments