[英]How to fix AttributeError: partially initialized module 'numpy1'?
I'm a python beginner I'm facing issue on numpy我是 python 初学者我在numpy上遇到问题
This is my code:这是我的代码:
import numpy1 as np
a = np.array([(1, 2, 3), (4, 5, 6)])
print(a)
Error:错误:
AttributeError: partially initialized module 'numpy1' has no attribute 'array' (most likely due to a circular import) AttributeError:部分初始化的模块'numpy1'没有属性'array'(很可能是由于循环导入)
how to fix this?如何解决这个问题?
Its fixed for me after changing the name of Python file, because 'numpy' is a build in file name.在更改 Python 文件的名称后,它对我来说是固定的,因为“numpy”是一个内置文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.