-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【PaddlePaddle Hackathon 3 No.14】为 Paddle 新增 remainder_ API #5156
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5156.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
paddle.remainder_的中文文档也需要单独创建一个文件 |
好的,已经添加 |
我指的是paddle.remainder_ ,inplace的这个API也需要自己的文档哈~ 另外paddle.remainder因为一些原因缺失了中文文档,感谢补充 |
好的,这部分也已经添加啦 |
@@ -0,0 +1,29 @@ | |||
.. _cn_api_tensor_remainder: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有点奇怪的是,这个页面(https://preview-pr-5156.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/remainder_cn.html)无法渲染在侧边栏,在该页面也无法渲染侧边栏
另外 mod 和 remainder 只是 alias 关系,也许我们可以有一个规范来避免这种重复 @BrilliantYuKaimin (这个和 mod 内容基本是一致的)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个很神奇,因为代码里就是这么写的:https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/math.py#L787
mod = remainder # noqa: F841
floor_mod = remainder # noqa: F841
也就是说这三个API拥有同一个ID,所以官网只会生成其中一个API文档,这个我之前提过,解决办法就是def 三个API,然后分别管理文档
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def mod(x, y, name=None):
return remainder(x, y, name)
mod.__doc__ = remainder.__doc__
这样?呃……好麻烦……
Co-authored-by: Nyakku Shigure <[email protected]>
Co-authored-by: Nyakku Shigure <[email protected]>
Co-authored-by: Nyakku Shigure <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for docs
PaddlePaddle/Paddle#45266 的中文文档
PADDLEPADDLE_PR=45266