You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at the example above that you will see that the patients are also being zero indexed:
patient_0 = data[0, :] # 0 on the first axis, everything on the second
print('maximum inflammation for patient 0:', patient_0.max())
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.
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, :])
The text was updated successfully, but these errors were encountered: