Skip to content

Conversation

@NKNaN
Copy link
Contributor

@NKNaN NKNaN commented Oct 23, 2024

PR Category

User Experience

PR Types

Bug fixes

Description

  1. 支持输入参数 df, loc, scale 的类型可以是 float 和 Tensor 的混合。
  2. 修复:输入参数全为 float 或 0-D Tensor 时,每个方法应该返回 0-D Tensor 而不是 1-D Tensor。(无不兼容问题)

@paddle-bot
Copy link

paddle-bot bot commented Oct 23, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Oct 23, 2024
)

if self.df.shape == []:
self.df = self.df.reshape([1])
Copy link
Contributor

@zhwesky2010 zhwesky2010 Oct 30, 2024

Choose a reason for hiding this comment

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

@NKNaN 这种0维和1维的问题你再排查下其他distribution api,看看还有没有这种0维改成1维的不合理操作,这个是一个典型的不合理操作:

if x.shape == []:
            x= x.reshape([1])

看看其他distribution有没这种问题,目前0维Tensor在paddle内是支持的并全面推广,如果有错误写法,支持不兼容升级过来

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@zhwesky2010
Copy link
Contributor

LGTM

@luotao1 luotao1 merged commit c5a96ee into PaddlePaddle:develop Oct 30, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants