I am tryint to convert some of my python arrays to numpy arrays and have problems accessing a supposingly global np array in another module.
Module 1 (imports data):
import numpy as np
jobs_db = []
def read_all_data(date, filepath):
global jobs_db
jobs_db = np.loadtxt(filepath+'jobs_input.csv', dtype=np.uint8, delimiter=",", skiprows=1)
Module 2 (uses data):
from Import_data import *
if __name__ == '__main__':
read_all_data(180901, 'C:/Users/*********/')
print(jobs_db)
However, when I execute the main method, the console shows an empty array while the array contains data when calling it whithin module 1. The problem does not occur if I use a python array instead of a numpy array.