I have used import numpy as np in my program and when I try to execute np.zeroes to create a numpy array then it does not recognize the module zeroes in the program.
This happens when I execute in the subdirectory where the python program is.
If I copy it root folder and execute, then it shows the results.
Can someone guide me as to why is this happening and what can I do to get the program executed in the subdirectory it self?
Thanks
Make sure you don’t have a file called
numpy.pyin your subdirectory. If you do, it would shadow the “real”numpymodule and cause the symptoms you describe.