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:
AscendGPUCPU
Examples
>>> scalar_cast = ops.ScalarCast() >>> output = scalar_cast(255.0, mindspore.int32) >>> print(output) 255