mindspore.ops.log10

mindspore.ops.log10(input)[source]

Compute the logarithm to the base 10 of the input tensor element-wise.

\[y_i = \log_{10}(input_i)\]

Warning

If the input value of operator log10 is within the range (0, 0.01] or [0.95, 1.05], the output accuracy may be affected.

Parameters

input (Tensor) – The input tensor.

Returns

Tensor

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> x = mindspore.tensor([2, 4, 10], mindspore.float16)
>>> output = mindspore.ops.log10(x)
>>> print(output)
[0.301 0.602 1.   ]