Conversation
tianyi21
left a comment
There was a problem hiding this comment.
Hi Andrea,
✅ You implemented the function to read and display a file.
✅ You completed the patient_summary() function to summarize a file 💬💬💬.
✅ You implemented the detect_problems() function to check the file.
💬 Your implementation is correct. However, I noticed you created intermediate variables called mean, max, and min. max and min are Python built-in functions, and you may have noticed that they are being highlighted in VSCode. Usually, it’s a good practice to avoid defining variables with the same name as function names to prevent potential confusion.
💬 np.array.min/max/mean() of a 2D array return a one dimensional vector contains the corresponding results (60, ). Therefore, you don't have to reshape that into a 2D array (60, 1) again.
💬 We defined a variable ax = 1 to specify that we would like to summarize over the row (axis 1). To improve readability and clarity, you may keep the variable in your code and directly specify axis=ax in the np functions.
🎉 Your A2 is complete!
🎊 All your Python assessments are now complete. Thank you for your participation, and I wish you all the best for your future!
Thanks,
Tianyi [LS]
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
First submission.
What did you learn from the changes you have made?
Shaping the numpy array in part 1 as well as how to incorporate two functions in part 3.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I am unsure if part 3 is correct, I tried on multiple files but I thought what was required was more complicated at first.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
I found different ways to test the code in addition to what was included as tests in the assignment to make sure the functions were behaving as I expected.
How were these changes tested?
Tested multiple files and manually checked the data files to compare.
A reference to a related issue in your repository (if applicable)
Checklist