@@ -44,7 +44,12 @@ class TimedeltaDelegateMixin(DatetimelikeDelegateMixin):
4444 # which we we dont' want to expose in the .dt accessor.
4545 _delegate_class = TimedeltaArray
4646 _delegated_properties = TimedeltaArray ._datetimelike_ops + ["components" ]
47- _delegated_methods = TimedeltaArray ._datetimelike_methods + ["_box_values" ]
47+ _delegated_methods = TimedeltaArray ._datetimelike_methods + [
48+ "_box_values" ,
49+ "__neg__" ,
50+ "__pos__" ,
51+ "__abs__" ,
52+ ]
4853 _raw_properties = {"components" }
4954 _raw_methods = {"to_pytimedelta" }
5055
@@ -56,7 +61,7 @@ class TimedeltaDelegateMixin(DatetimelikeDelegateMixin):
5661 TimedeltaArray ,
5762 TimedeltaDelegateMixin ._delegated_methods ,
5863 typ = "method" ,
59- overwrite = False ,
64+ overwrite = True ,
6065)
6166class TimedeltaIndex (
6267 DatetimeIndexOpsMixin , dtl .TimelikeOps , Int64Index , TimedeltaDelegateMixin
@@ -279,14 +284,6 @@ def __setstate__(self, state):
279284
280285 _unpickle_compat = __setstate__
281286
282- def _maybe_update_attributes (self , attrs ):
283- """ Update Index attributes (e.g. freq) depending on op """
284- freq = attrs .get ("freq" , None )
285- if freq is not None :
286- # no need to infer if freq is None
287- attrs ["freq" ] = "infer"
288- return attrs
289-
290287 # -------------------------------------------------------------------
291288 # Rendering Methods
292289
@@ -689,7 +686,6 @@ def delete(self, loc):
689686
690687
691688TimedeltaIndex ._add_comparison_ops ()
692- TimedeltaIndex ._add_numeric_methods_unary ()
693689TimedeltaIndex ._add_logical_methods_disabled ()
694690TimedeltaIndex ._add_datetimelike_methods ()
695691
0 commit comments