File tree 1 file changed +2
-2
lines changed
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:
1398
1398
np_dtype = np .dtype (f"M8[{ pa_type .unit } ]" )
1399
1399
dtype = tz_to_dtype (pa_type .tz , pa_type .unit )
1400
1400
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 )
1402
1402
return DatetimeArray ._simple_new (np_array , dtype = dtype )
1403
1403
1404
1404
def _to_timedeltaarray (self ) -> TimedeltaArray :
@@ -1409,7 +1409,7 @@ def _to_timedeltaarray(self) -> TimedeltaArray:
1409
1409
assert pa .types .is_duration (pa_type )
1410
1410
np_dtype = np .dtype (f"m8[{ pa_type .unit } ]" )
1411
1411
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 )
1413
1413
return TimedeltaArray ._simple_new (np_array , dtype = np_dtype )
1414
1414
1415
1415
def _values_for_json (self ) -> np .ndarray :
You can’t perform that action at this time.
0 commit comments