uz_assignments/assignment2/uz_framework/text.py

10 lines
183 B
Python
Raw Normal View History

2022-10-26 16:08:01 +02: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=' ')