10 lines
183 B
Python
10 lines
183 B
Python
|
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=' ')
|
||
|
|