-
Notifications
You must be signed in to change notification settings - Fork 187
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
【PPSCI Doc No.93-96, 98-102】 #730
Conversation
Thanks for your contribution! |
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.
辛苦大佬
ppsci/utils/misc.py
Outdated
>>> arr = np.array([[1., 2., 3.], [4., 5., 6.]]) | ||
>>> result = ppsci.utils.misc.convert_to_dict(arr, ("x", "y", "z")) | ||
>>> print(result) | ||
{'x': array([[1.], | ||
[4.]]), 'y': array([[2.], | ||
[5.]]), 'z': array([[3.], | ||
[6.]])} |
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.
这里可以打印一下arr.shape,然后用for循环打印一下result里的k, v.shape,这样子能更直观
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.
已修改
ppsci/utils/misc.py
Outdated
<BLANKLINE> | ||
[[1., 2.], | ||
[3., 4.]]]), 'y': array([[[5., 6.], | ||
[7., 8.]], | ||
<BLANKLINE> |
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.
已删除
ppsci/utils/misc.py
Outdated
|
||
[[1., 2.], | ||
[3., 4.]]]), 'y': array([[[5., 6.], | ||
[7., 8.]], | ||
|
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.
已删除
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
* udpate docs * update * update
PR types
Others
PR changes
Docs
Describe
PPSCI Doc No.93-96, 98-102