Conversation
There was a problem hiding this comment.
Change Request: Part 2
Your implementation works well and shows a solid grasp of loops and NumPy basics — great job on that. Now, think about whether you really need to loop through the data manually. NumPy offers built-in functions that work efficiently across axes, which can help clean up your code and remove hardcoded values like 60.
Can you think of a way to replace the loop with a single NumPy operation that works across each patient row, no matter how many rows are in the dataset?
Revert "Corrected P2 to use numpy arrays" This reverts commit 1fcc7c3.
|
Hi Xindi, thanks for pointing out the mistake. I have corrected the mistake in P2 and made it much more efficient using the np array to calculate the operations. I've tested the changes and pushed the updated changes to Github. Please let me know if I need to do anything further. Thanks! Used this block of code: |
xindizhang
left a comment
There was a problem hiding this comment.
Thank you for the update and note! Great work — no further changes needed!
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Added code for assignment 2
What did you learn from the changes you have made?
All the concepts covered in Week 2 of python - for and while loops, different functions and methods i.e: readlines, etc
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
N/A
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Thinking through how to implement the logic through python. Code itself wasn't the tough part
How were these changes tested?
Through using the testers provided and using print statements to check code was executing as expected
A reference to a related issue in your repository (if applicable)
N/A
Checklist