TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.promote_types

tensorplay.functional.promote_types(type1, type2) → dtype[source]

Returns the tensorplay.dtype with the smallest size and scalar kind that is not smaller nor of lower kind than either type1 or type2. See type promotion documentation for more information on the type promotion logic.

Parameters:

Example:

>>> tensorplay.promote_types(tensorplay.int32, tensorplay.float32)
tensorplay.float32
>>> tensorplay.promote_types(tensorplay.uint8, tensorplay.long)
tensorplay.long

On this page

Ask DeepWiki