[docs] fix api labels in math.py #56682
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Docs
Description
修复一些错误的 API label,现在英文的 api label 的生成规则是
'_api_' + self.api_name.replace('.', '_')
,比如paddle.jit.to_static
对应api_paddle_jit_to_static
(前面的下划线只是 label 的语法前缀而已,因此不包含最前面的下划线),详情见https://github.com/PaddlePaddle/docs/blob/09e2032370e74ed731f6a9bc27bfeb62e35af590/docs/api/gen_doc.py#L746C13-L746C54
而 Paddle 有很多 label 是写错的,因此校正一下,错误示例如下:
注意有很多 inplace API 没有写在
paddle.__all__
里所以英文文档里找不到它们,所以无法预览剩下还有很多,用正则
即可搜出(
api_guide_Name
和api_paddle_*
都是合法的因此排除),剩下的感觉可以拆一拆发个小任务 @sunzhongkai588PCard-66962