File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1398,7 +1398,7 @@ def _to_datetimearray(self) -> DatetimeArray:
13981398 np_dtype = np .dtype (f"M8[{ pa_type .unit } ]" )
13991399 dtype = tz_to_dtype (pa_type .tz , pa_type .unit )
14001400 np_array = self ._pa_array .to_numpy ()
1401- np_array = np_array .astype (np_dtype )
1401+ np_array = np_array .astype (np_dtype , copy = False )
14021402 return DatetimeArray ._simple_new (np_array , dtype = dtype )
14031403
14041404 def _to_timedeltaarray (self ) -> TimedeltaArray :
@@ -1409,7 +1409,7 @@ def _to_timedeltaarray(self) -> TimedeltaArray:
14091409 assert pa .types .is_duration (pa_type )
14101410 np_dtype = np .dtype (f"m8[{ pa_type .unit } ]" )
14111411 np_array = self ._pa_array .to_numpy ()
1412- np_array = np_array .astype (np_dtype )
1412+ np_array = np_array .astype (np_dtype , copy = False )
14131413 return TimedeltaArray ._simple_new (np_array , dtype = np_dtype )
14141414
14151415 def _values_for_json (self ) -> np .ndarray :
You can’t perform that action at this time.
0 commit comments