Skip to content

Conversation

@SigureMo
Copy link
Member

PR Category

Execute Infrastructure

PR Types

Performance

Description

对 NumPy number 及其操作进行支持,这包括了:

  • 通过 ufunc(const) 产生 NumPy number
  • NumPy number 和 Tensor / NumPy number / const 的运算
  • NumPy number 通过 int / float / np.number.item 转回 const

PCard-66972

@paddle-bot
Copy link

paddle-bot bot commented Feb 26, 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 changed the title [SOT] Add support for numpy ufunc with numpy number [SOT][3.13] Add support for numpy ufunc with numpy number Feb 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines 60 to 61
return a, b, c, d, e, f, g, h, i, j, h

Copy link

Copilot AI Feb 26, 2025

Choose a reason for hiding this comment

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

The return tuple includes the variable 'h' twice, which appears to be an unintentional duplication. Please verify if both occurrences are intended or if one should be replaced with a different variable.

Suggested change
return a, b, c, d, e, f, g, h, i, j, h
return a, b, c, d, e, f, g, h, i, j, i

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

可以,还有点用,虽然 suggest 的 code 不太对

Copy link
Contributor

@DrRyanHuang DrRyanHuang left a comment

Choose a reason for hiding this comment

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

I've reviewed 5 out of 5 changed files in this pull request and generated 1 comment.🤪

Comment on lines 1360 to 1361
if unary_fn in [bool]:
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using if unary_fn is bool: instead of if unary_fn in [bool]: for direct type comparison, improving readability and avoiding the unnecessary use of a list.

@SigureMo SigureMo changed the title [SOT][3.13] Add support for numpy ufunc with numpy number [SOT] Add support for numpy ufunc with numpy number Feb 27, 2025
@SigureMo SigureMo merged commit 309245b into PaddlePaddle:develop Feb 27, 2025
33 checks passed
@SigureMo SigureMo deleted the sot/add-support-for-numpy-ufunc-with-numpy-number branch February 27, 2025 07:01
Enigmatisms pushed a commit to Enigmatisms/Paddle that referenced this pull request Mar 6, 2025
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants