uz_assignments/assignment4/uz_framework/text.py

10 lines
183 B
Python
Raw Normal View History

2022-11-26 14:42:48 +01:00
import numpy as np
def read_data(filename: str):
# reads a numpy array from a text file
with open(filename) as f:
s = f.read()
return np.fromstring(s, sep=' ')