File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -518,14 +518,14 @@ def _box_pa_array(
518518 dta = DatetimeArray ._from_sequence (
519519 value , copy = copy , dtype = pass_dtype
520520 )
521- mask = dta .isna ()
522- value_i8 = dta .view ("i8" )
523- if not np . asarray ( value_i8 ) .flags ["WRITEABLE" ]:
521+ dta_mask = dta .isna ()
522+ value_i8 = cast ( "npt.NDArray" , dta .view ("i8" ) )
523+ if not value_i8 .flags ["WRITEABLE" ]:
524524 # e.g. test_setitem_frame_2d_values
525525 value_i8 = value_i8 .copy ()
526526 dta = DatetimeArray ._from_sequence (value_i8 , dtype = dta .dtype )
527- value_i8 [mask ] = 0 # GH#61776 avoid __sub__ overflow
528- pa_array = pa .array (dta ._ndarray , type = pa_type , mask = mask )
527+ value_i8 [dta_mask ] = 0 # GH#61776 avoid __sub__ overflow
528+ pa_array = pa .array (dta ._ndarray , type = pa_type , mask = dta_mask )
529529 return pa_array
530530
531531 try :
You can’t perform that action at this time.
0 commit comments