Join GitHub today
Index error in 'Analyzing Patient Data' - 01-numpy.md #362
In the lesson 'Analyzing Patient Data' there is an index error.
After the heading 'Mystery Functions in IPython', is the line:
print('maximum inflammation for patient 2:', numpy.max(data[2, :]))
Since indexation in python starts at 0, Patient 2 should be numpy.max(data[1, :])
If you look at the example above that you will see that the patients are also being zero indexed:
So patient 2 is the 3rd patient in the list and thus in index 2.
However, this was quite confusing for those in the workshop I attended. It might be helpful to add a call out box indicating that we are shifting our language to match the array indexing. i.e. The array starts with the zeroth patient, then the first patient, etc.