mindspore.ops.ScalarCast

class mindspore.ops.ScalarCast[source]

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