@@ -12,7 +12,6 @@ from typing import (
1212 type_check_only ,
1313)
1414
15- import numpy as np
1615from pandas .core .accessor import PandasDelegate
1716from pandas .core .arrays .base import ExtensionArray
1817from pandas .core .arrays .categorical import Categorical
@@ -45,8 +44,8 @@ from pandas._typing import (
4544 TimestampConvention ,
4645 TimeUnit ,
4746 TimeZones ,
48- np_1darray ,
4947 np_1darray_bool ,
48+ np_1darray_object ,
5049 np_ndarray_bool ,
5150)
5251
@@ -135,10 +134,10 @@ class _DatetimeObjectOps(
135134): ...
136135
137136_DTOtherOpsDateReturnType = TypeVar (
138- "_DTOtherOpsDateReturnType" , bound = Series [date ] | np_1darray [ np . object_ ]
137+ "_DTOtherOpsDateReturnType" , bound = Series [date ] | np_1darray_object
139138)
140139_DTOtherOpsTimeReturnType = TypeVar (
141- "_DTOtherOpsTimeReturnType" , bound = Series [time ] | np_1darray [ np . object_ ]
140+ "_DTOtherOpsTimeReturnType" , bound = Series [time ] | np_1darray_object
142141)
143142
144143class _DatetimeOtherOps (Generic [_DTOtherOpsDateReturnType , _DTOtherOpsTimeReturnType ]):
@@ -293,7 +292,7 @@ class DatetimeProperties(
293292 _DTToPeriodReturnType ,
294293 ],
295294):
296- def to_pydatetime (self ) -> np_1darray [ np . object_ ] : ...
295+ def to_pydatetime (self ) -> np_1darray_object : ...
297296 def isocalendar (self ) -> DataFrame : ...
298297 @property
299298 def unit (self ) -> TimeUnit : ...
@@ -309,7 +308,7 @@ _TDTotalSecondsReturnType = TypeVar(
309308class _TimedeltaPropertiesNoRounding (
310309 Generic [_TDNoRoundingMethodReturnType , _TDTotalSecondsReturnType ]
311310):
312- def to_pytimedelta (self ) -> np_1darray [ np . object_ ] : ...
311+ def to_pytimedelta (self ) -> np_1darray_object : ...
313312 @property
314313 def components (self ) -> DataFrame : ...
315314 @property
@@ -418,8 +417,8 @@ class DatetimeIndexProperties(
418417 Index [int ],
419418 np_1darray_bool ,
420419 DatetimeIndex ,
421- np_1darray [ np . object_ ] ,
422- np_1darray [ np . object_ ] ,
420+ np_1darray_object ,
421+ np_1darray_object ,
423422 BaseOffset ,
424423 DatetimeIndex ,
425424 Index ,
@@ -431,7 +430,7 @@ class DatetimeIndexProperties(
431430 def is_normalized (self ) -> bool : ...
432431 @property
433432 def tzinfo (self ) -> _tzinfo | None : ...
434- def to_pydatetime (self ) -> np_1darray [ np . object_ ] : ...
433+ def to_pydatetime (self ) -> np_1darray_object : ...
435434 def std (
436435 self , axis : int | None = ..., ddof : int = ..., skipna : bool = ...
437436 ) -> Timedelta : ...
0 commit comments