Skip to content
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

【Hackathon 5th No.14】Add combinations API to Paddle #6287

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

Patrick-Star125
Copy link
Contributor

@Patrick-Star125 Patrick-Star125 commented Nov 4, 2023

Copy link

paddle-bot bot commented Nov 4, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6287.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交之前,用pre-commit自动修复下文档风格

Comment on lines 8 to 9
对输入 Tensor 计算长度为 r 的情况下的所有组合,当 `with_replacement` 设为True时可类比python中API `itertools.combinations` 。
而当 `with_replacement` 设为True则可类比API `itertools.combinations_with_replacement` 中参数 `with_replacement` 设为True。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 是不是写错了?应该是一个为 False 一个为 True 吧。另外语句尽量通顺一些
  2. 中英文之间加空格

::::::::::
- **x** (Tensor) - 输入 1-D Tensor,它的数据类型可以是 float16,float32,float64,int32,int64。
- **r** (int,可选) - 组合的数长度,默认值为 2。
- **with_replacement** (bool,可选) - 是否运行组合数中出现重复值,默认值为 False。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写明默认值为 false 代表的含义

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 0d8bb42 into PaddlePaddle:develop Dec 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor PaddlePaddle Hackathon 飞桨黑客松活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants