monroews / CEE4530

MIT License
4 stars 11 forks source link

"index 0 is out of bounds for axis 0 with size 0" #110

Open jiwon0206 opened 5 years ago

jiwon0206 commented 5 years ago

hi! we're trying to code the for-loop for the linear regression in number 4 and we keep running into this error. it seems like the 12th data set that we're running through doesn't have anything in it because python is saying that the 0th row doesn't exist.

number4
monroews commented 5 years ago

time_data is an array of arrays of time. Thus time_data[0] is the array of times for the first experiment (corresponding to the lowest airflow rate. The time series for each data set has been set so that it begins with time = 0 seconds. If you want to access the start time for the ith experiment you would use time_data[i][0]. Of course that would be boring because the result will be 0 seconds!

This for loop seems to be trying to subtract the times from one experiment from the times in another experiment.