I am reading data from a file and extracting the information that I want from it, as floats. I am then storing this data into a temporary list and using vstack
to try and put the data into an array with each row being new data that is being processed.
for line in lines:
if line.find('GPS')!=-1:
funcGPS(line)
if line.find('-----')!=-1:
MasterArray = numpy.vstack(temp)
temp = []
#print MasterArray
if line.find('SERVO')!=-1:
funcSERVO(line)
This is how I am trying to copy the data to the array. I am successfully extracting the data and after extracting the data obtained I want to add the data to the array. Currently, it is copying the data over the previous data when I build onto MasterArray
. Is there anyway to do this without specifically stating what the size of MasterArray
is? I don't want to limit the amount of data that can be obtained.
Thanks!