latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.result_type
- tensorplay.functional.result_type(tensor1, tensor2) dtype[source]
Returns the
tensorplay.dtypethat 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:
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
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

