CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【SCU】【Paddle Tensor No.18】新增 paddle.nan, 复用math.nan #69542
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
python/paddle/__init__.py
Outdated
@@ -772,8 +772,8 @@ | |||
ir_guard = IrGuard() | |||
ir_guard._switch_to_pir() | |||
|
|||
nan = math.nan |
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.
常量写到776行下面
python/paddle/tensor/__init__.py
Outdated
@@ -466,6 +466,7 @@ | |||
) | |||
from .to_string import set_printoptions # noqa: F401 | |||
|
|||
# from math import nan |
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.
无用注释删除
python/paddle/__init__.py
Outdated
'nan', | ||
'inf', |
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.
请不要删除已有常量newaxis
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.
和最新代码合并一下
python/paddle/__init__.py
Outdated
inf = math.inf | ||
nan = math.nan | ||
newaxis: None = None |
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.
删除newaxis
def TestConstantInf(self): | ||
x = np.array([paddle.inf]) | ||
np.testing.assert_equal(repr(x), 'array([inf])') | ||
|
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.
删除inf的test
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.
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.
LGTM
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.
LGTM
PR Category
User ExperiencePR Types
New featuresDescription
新增 paddle.nan, 复用math.nan