@@ -5279,24 +5279,17 @@ def _arith_op(left, right):
52795279 new_data = dispatch_fill_zeros (func , this .values , other .values , res_values )
52805280 return this ._construct_result (new_data )
52815281
5282- def _combine_match_index (self , other , func , level = None ):
5283- left , right = self .align (other , join = "outer" , axis = 0 , level = level , copy = False )
5284- # at this point we have `left.index.equals(right.index)`
5282+ def _combine_match_index (self , other , func ):
5283+ # at this point we have `self.index.equals(other.index)`
52855284
5286- if left ._is_mixed_type or right ._is_mixed_type :
5285+ if self ._is_mixed_type or other ._is_mixed_type :
52875286 # operate column-wise; avoid costly object-casting in `.values`
5288- new_data = ops .dispatch_to_series (left , right , func )
5287+ new_data = ops .dispatch_to_series (self , other , func )
52895288 else :
52905289 # fastpath --> operate directly on values
52915290 with np .errstate (all = "ignore" ):
5292- new_data = func (left .values .T , right .values ).T
5293- return left ._construct_result (new_data )
5294-
5295- def _combine_match_columns (self , other : Series , func , level = None ):
5296- left , right = self .align (other , join = "outer" , axis = 1 , level = level , copy = False )
5297- # at this point we have `left.columns.equals(right.index)`
5298- new_data = ops .dispatch_to_series (left , right , func , axis = "columns" )
5299- return left ._construct_result (new_data )
5291+ new_data = func (self .values .T , other .values ).T
5292+ return new_data
53005293
53015294 def _construct_result (self , result ) -> "DataFrame" :
53025295 """
0 commit comments