Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

mindspore.Tensor.log10

Tensor.log10() Tensor

Returns the logarithm to the base 10 of a tensor element-wise.

yi=log10(xi)

Warning

  • This is an experimental API that is subject ot change or deletion.

  • If the self value of operator Log10 is within the range (0, 0.01] or [0.95, 1.05], the output accuracy may be affacted.

Note

The value of self must be greater than 0.

Returns

Tensor, has the same shape as the self, and the dtype changes according to the self.dtype.

  • if self.dtype is in [float16, float32, float64, bfloat16, complex64, complex128], the output dtype is the same as the self.dtype.

  • if self.dtype is double type, the output dtype is float64.

  • if self.dtype is integer or boolean type on Ascend, the output dtype is float32.

Raises
  • TypeError – If self.dtype is not one of bool, uint8, int8, int16, int32, int64, bfloat16, float16, float32, float64, double, complex64, complex128.

  • TypeError – If self.dtype is integer or boolean type on CPU and GPU.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> x = Tensor(np.array([1.0, 3.0, 5.0]), mindspore.float32)
>>> output = x.log10()
>>> print(output)
[0.         0.47712126 0.69897   ]