def load_file(path):
path = pathlib.Path(path)<EOL>data = path.open().readlines()<EOL>data = [l for l in data if len(l.strip()) and not l.startswith("<STR_LIT:#>")]<EOL>n = len(data)<EOL>m = len(data[<NUM_LIT:0>].strip().split())<EOL>res = np.zeros((n, m), dtype=np.dtype(float))<EOL>for ii in range(n):<EOL><INDENT>res[ii] = np.array(data[ii].strip().replace("<STR_LIT:U+002C>", "<STR_LIT:.>").split(),<EOL>dtype=float)<EOL><DEDENT>return res<EOL>
Load a txt data file