mindspore.ops.float_power
- mindspore.ops.float_power(input, exponent)[source]
Computes input to the power of the exponent. For the real number type, cast input and exponent to mindspore.float64 to calculate. Currently, complex type calculation is not supported.
- Parameters
- Returns
Tensor, the shape is the same as the one after broadcasting. For the complex type, the return value type is the same as the input type. For the real number type, the return value type is mindspore.float64.
- Raises
- Supported Platforms:
GPU
CPU
Examples
>>> input = Tensor(np.array([-1.5, 0., 2.])) >>> output = ops.float_power(input, 2) >>> print(output) [2.25 0. 4. ]