Skip to content
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

paddle2.2.2创建张量时遇到NumPy弃用警告:DeprecationWarning #41745

Closed
Senwei-Huang opened this issue Apr 13, 2022 · 2 comments
Closed
Assignees

Comments

@Senwei-Huang
Copy link

bug描述 Describe the Bug

代码:
import paddle
print(paddle.to_tensor([0,1]))

输出:
/home/senweihuang/anaconda3/lib/python3.9/site-packages/paddle/tensor/creation.py:130: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:

Tensor(shape=[2], dtype=int64, place=CPUPlace, stop_gradient=True,
[0, 1])

环境:
Ubuntu 18.04
python 3.9.7
paddle 2.2.2

其他补充信息 Additional Supplementary Information

No response

@SigureMo
Copy link
Member

应当已经于 #42929 解决了,升级到 2.3.1 应该就没这个 warning 啦~

image

image

@paddle-bot
Copy link

paddle-bot bot commented Jul 18, 2023

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants