Python Forum
import numpy in sub-files - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: import numpy in sub-files (/thread-20343.html)



import numpy in sub-files - paul18fr - Aug-06-2019

Hi all

This question is (very) basic but I haven't found the answer so far: I'm calling functions from another files, using all Numpy for among other things; obviously in the main file I call all the libraries and files, but I noticed that if "import Numpy as np" has not been inserted the all the (sub)files, It fails asking that "np is not defined"???.

I've been thinking that the libraries have to be called only once, in the main file, but I'm probably missing something isn't it?

Thanks

Paul


RE: import numpy in sub-files - chakrimakam - Aug-06-2019

Big Grin

what is different between R programming and Python in data science which is better?