-
Notifications
You must be signed in to change notification settings - Fork 883
[API Compatibility No.350] Update fill_diagonal_ alias docs #7703
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
base: develop
Are you sure you want to change the base?
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7703.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
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.
Pull request overview
This PR documents the parameter alias support for paddle.Tensor.fill_diagonal_ method, specifically adding documentation that fill_value can be used as an alias for the value parameter.
Changes:
- Added alias note in the Chinese API documentation (
Tensor__upper_cn.rst) indicating thatfill_valueis an alias forvalue - Updated PyTorch difference documentation to reflect the alias support and clarify the extra parameters
- Added a code example demonstrating the use of the
fill_valuealias
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md |
Updated PyTorch compatibility documentation to mention fill_value alias support and added name parameter description |
docs/api/paddle/Tensor__upper_cn.rst |
Added alias documentation for value parameter and included example demonstrating fill_value usage |
| | ---------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | | ||
| | fill_value | value | 以输入 value 值修改原始 Tensor 对角线元素,仅参数名不一致。 | | ||
| | fill_value | value | Paddle 支持 ``fill_value`` 作为 ``value`` 的别名。 | | ||
| | - | offset | 所选取对角线相对原始主对角线位置的偏移量,正向右上方偏移,负向左下方偏移,默认为 0。PyTorch 无此参数, Paddle 保持默认即可。 | |
Copilot
AI
Jan 28, 2026
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.
缺少空格:中文逗号后面应该有一个空格。应将"PyTorch 无此参数, Paddle 保持默认即可。"修改为"PyTorch 无此参数,Paddle 保持默认即可。"(去掉逗号后多余的空格)。
|
@xunyoyo 放一下Paddle修改的PR链接 |
PR Category
Documentation
PR Types
Documentation
Description
fill_valuealias note forpaddle.Tensor.fill_diagonal_in Tensor CN docs.