"Python Data Analysis" module ' numpy ' has no attribute ' array '

Source: Internet
Author: User

After installing the NumPy module, I started to do a few small tests to run, but when I created numpy.py this file

numpy.py

import numpyy = Numpy.array ([[[11,4,2],[2,6,1],[32,6,42]])print(y)

After the operation error:

Traceback (most recent):
File "D:\Python_Reptile\numpy.py", line 1, <module>
Import NumPy
File "D:\Python_Reptile\numpy.py", line 2, <module>
y = Numpy.array ([[11,4,2],[2,6,1],[32,6,42]])
Attributeerror:module ' NumPy ' has no attribute ' array '


Baidu opened the query for a long time, and the previous test through the code put to the file run, all error, it is strange! Finally found the problem of file name numpy.py

After modifying the file name, the problem is resolved, perhaps the reason why the filename conflicts with the module name!

"Python Data Analysis" module ' numpy ' has no attribute ' array '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.