Python Forum

Full Version: import numpy in sub-files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Big Grin

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