# tensorplay.functional.result_type Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.result_type.html ```python tensorplay.functional.result_type(tensor1, tensor2) → dtype ``` Returns the [tensorplay.dtype](/docs/generated/tensorplay.DType.html#tensorplay.DType) that would result from performing an arithmetic operation on the provided input tensors. See type promotion documentation for more information on the type promotion logic. Parameters: - tensor1 ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor) or Number) – an input tensor or number - tensor2 ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor) or Number) – an input tensor or number Example: ``` >>> tensorplay.result_type(tensorplay.tensor([1, 2], dtype=tensorplay.int), 1.0) tensorplay.float32 >>> tensorplay.result_type(tensorplay.tensor([1, 2], dtype=tensorplay.uint8), tensorplay.tensor(1)) tensorplay.uint8 ```