# tensorplay.masked.logaddexp Source: https://www.tensorplay.cn/docs/generated/tensorplay.masked.logaddexp.html ```python tensorplay.masked.logaddexp(input, other, *, dtype=None, input_mask=None, other_mask=None) → Tensor ``` Returns logaddexp of all the elements in the input and the other tensor. The input elements are masked out according to the boolean tensor input_mask and the attr:other elements are masked out according to the boolean tensor other_mask. The shapes of a mask tensor and the tensor to be masked don’t need to match, but they must be broadcastable under the standard broadcasting rules and the dimensionality of the mask tensor must not be greater than of the tensor to be masked. Parameters: - input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor - other ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the second input tensor Keyword Arguments: - dtype ([tensorplay.dtype](/docs/generated/tensorplay.DType.html#tensorplay.DType), optional) – the desired data type of returned tensor. If specified, the output tensor is casted to dtype after the operation is performed. Default: None. - input_mask ([tensorplay.Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the boolean tensor containing the binary mask of validity of input tensor elements. Default: None that is equivalent to tensorplay.ones(input.shape, dtype=tensorplay.bool). - other_mask ([tensorplay.Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the boolean tensor containing the binary mask of validity of other tensor elements. Default: None that is equivalent to tensorplay.ones(other.shape, dtype=tensorplay.bool). Example: ``` >>> input = tensorplay.tensor([-100.0, -200, -300]) >>> input tensor([-100., -200., -300.]) >>> other = tensorplay.tensor([-1.0, -2, -3]) >>> other tensor([-1., -2., -3.]) >>> mask = tensorplay.tensor([True, False, True]) >>> mask tensor([ True, False, True]) >>> tensorplay.masked._ops.logaddexp(input, other, input_mask=mask, other_mask=mask) tensor([-1., -inf, -3.]) ```