I recently reset my laptop due to some technical issues. After that, I discovered that numpy wasnt working anymore and showed ImportError: numpy.core.multiarray failed to import
when I run the following code. I'm using python 3.6.8.
import numpy as np
import matplotlib as pyplot
a = [1, 2, 3]
b = [1, 2, 3]
fig = pyplot.figure()
pyplot.title("a")
pyplot.ylabel("b")
pyplot.xlabel("c")
pyplot.plot(a, b, marker = 'o')
pyplot.show()
And this is the error:
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "d:/ENGG 233 Codes/numpy.py", line 1, in <module>
import numpy as np
File "d:\ENGG 233 Codes\numpy.py", line 2, in <module>
import matplotlib as pyplot
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\__init__.py", line 174, in <module>
_check_versions()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\__init__.py", line 159, in _check_versions
from . import ft2font
ImportError: numpy.core.multiarray failed to import