Skip to content

Conversation

@huangjiyi
Copy link
Member

@huangjiyi huangjiyi commented Oct 29, 2025

PR Category

User Experience

PR Types

Bug fixes

Description

支持 paddle.Tensorpir.Value 类型的 var 和 None__eq____ne__ 操作

示例:

import paddle
x = paddle.tensor(1.)
if x == None:  # get False in all case
    pass
if x != None:  # get True in all case
    pass

@paddle-bot
Copy link

paddle-bot bot commented Oct 29, 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.

SigureMo
SigureMo previously approved these changes Oct 29, 2025
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo changed the title [API Compatibility] Support tensor equals None usage [API Compatibility] Support tensor equals None usage Oct 29, 2025
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

ne 也加一下相关处理吧

@huangjiyi huangjiyi changed the title [API Compatibility] Support tensor equals None usage [API Compatibility] Fix tensor __eq__ an __ne__ for unsupported type Oct 30, 2025
@huangjiyi huangjiyi changed the title [API Compatibility] Fix tensor __eq__ an __ne__ for unsupported type [API Compatibility] Fix tensor __eq__ and __ne__ for unsupported type Oct 30, 2025
SigureMo
SigureMo previously approved these changes Oct 30, 2025
@zhwesky2010
Copy link
Contributor

PR Category

User Experience

PR Types

Bug fixes

Description

  • Fix tensor __eq__ and __ne__ for unsupported type

这里可以详细描述下支持的是哪两种功能,给出一下示例代码

SigureMo
SigureMo previously approved these changes Oct 30, 2025
@zhwesky2010 zhwesky2010 merged commit c75344c into PaddlePaddle:develop Oct 31, 2025
77 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants