-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[SOT] Add support for numpy ufunc with numpy number #71295
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
[SOT] Add support for numpy ufunc with numpy number #71295
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this 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.
test/sot/test_numpy.py
Outdated
| return a, b, c, d, e, f, g, h, i, j, h | ||
|
|
Copilot
AI
Feb 26, 2025
There was a problem hiding this comment.
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.
| return a, b, c, d, e, f, g, h, i, j, h | |
| return a, b, c, d, e, f, g, h, i, j, i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以,还有点用,虽然 suggest 的 code 不太对
There was a problem hiding this 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.🤪
| if unary_fn in [bool]: | ||
| continue |
There was a problem hiding this comment.
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.
PR Category
Execute Infrastructure
PR Types
Performance
Description
对 NumPy number 及其操作进行支持,这包括了:
ufunc(const)产生 NumPy numberint/float/np.number.item转回 constPCard-66972