My python code goes like this
with open('file.txt') as w:
k = np.asarray(w.readlines(),np.float)
But when I do this k is an array with all lines read from file.txt
I am trying to figure to read only the first n
lines and store k
using np.asarray
How to edit this code with n
Thanks for the help!