logaddexp¶
- logaddexp(x1: array, x2: array, /) array¶
- Calculates the logarithm of the sum of exponentiations - log(exp(x1) + exp(x2))for each element- x1_iof the input array- x1with the respective element- x2_iof the input array- x2.- Parameters:
- x1 (array) – first input array. Should have a real-valued floating-point data type. 
- x2 (array) – second input array. Must be compatible with - x1(see Broadcasting). Should have a real-valued floating-point data type.
 
- Returns:
- out (array) – an array containing the element-wise results. The returned array must have a real-valued floating-point data type determined by Type Promotion Rules. 
 - Notes - Special cases - For floating-point operands, - If either - x1_ior- x2_iis- NaN, the result is- NaN.
- If - x1_iis- +infinityand- x2_iis not- NaN, the result is- +infinity.
- If - x1_iis not- NaNand- x2_iis- +infinity, the result is- +infinity.