mindspore.ops.ScalarCast

class mindspore.ops.ScalarCast[源代码]

Casts the input scalar to another type.

Refer to mindspore.ops.scalar_cast() for more detail.

Supported Platforms:

Ascend GPU CPU

Examples

>>> scalar_cast = ops.ScalarCast()
>>> output = scalar_cast(255.0, mindspore.int32)
>>> print(output)
255