uz_assignments/assignment3/uz_framework/text.py

10 lines
183 B
Python
Raw Normal View History

2022-11-13 15:13:43 +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=' ')