Python Forum
import numpy in sub-files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import numpy in sub-files
#1
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
Reply
#2
Big Grin

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 284 Mar-26-2024, 02:18 PM
Last Post: snippsat
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,527 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  Import multiple CSV files into pandas Krayna 0 1,693 May-20-2021, 04:56 PM
Last Post: Krayna
  import numpy problem ptnb 1 2,075 May-18-2020, 06:03 PM
Last Post: ptnb
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 2,926 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  Comparing 2 Files - Step 1, import and remove tags JP_ROMANO 7 4,103 Oct-04-2018, 12:43 PM
Last Post: JP_ROMANO
  ImportError: numpy.core.multiarray failed to import Nimya 3 20,532 Jun-12-2018, 02:32 PM
Last Post: volcano63
  not able to import numpy in pthon_d leiwengi 0 2,668 May-17-2018, 09:46 PM
Last Post: leiwengi
  import/use data from text files MichealPeterson 1 3,281 Jun-28-2017, 08:51 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020