Skip to content

[Bug Fix]未显式指定参数名造成 NumPy 断言语义不明确#76077

Merged
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:1028-1
Oct 30, 2025
Merged

[Bug Fix]未显式指定参数名造成 NumPy 断言语义不明确#76077
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:1028-1

Conversation

@ApricityXX
Copy link
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

使用 np.testing.assert_allclose 时直接按位置顺序传入参数,未命名 rtolatol,可能在 NumPy 版本更新后导致语义错误或警告,降低代码稳定性和可维护性。
显式命名 rtolatol 参数可以避免因 NumPy 参数位置改动或用户误读导致的问题,增强代码语义清晰度和兼容性。

@paddle-bot
Copy link

paddle-bot bot commented Oct 28, 2025

你的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 28, 2025
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Oct 28, 2025
@luotao1 luotao1 merged commit 85d52f2 into PaddlePaddle:develop Oct 30, 2025
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR skip-ci: dcu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants