Conversation
efantinatti
suggested changes
Dec 11, 2025
efantinatti
left a comment
There was a problem hiding this comment.
Hi @brianna-lowe Q1 is OK but Q2 can be tested with the other scenarios for max and mean. Q3 you also can consider to test all files and see which one you'll find the True value.
Owner
Author
|
@efantinatti Based on your feedback, I have upated section 2 & 3 |
efantinatti
suggested changes
Dec 15, 2025
efantinatti
left a comment
There was a problem hiding this comment.
Hi @brianna-lowe Q1 is ok, however Q2 you may consider printing the contents for min, max, mean and other parameter different of these three, so we can see the outputs performing accordingly. Q3 you may consider scanning the files to find the ones with the True values.
Best
@efantinatti
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UofT-DSI | Python - Assignment 2
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I implemented the full patient inflammation analysis workflow for Assignment 2. This includes loading and inspecting CSV data, adding a loop to print rows for inspection, building the patient_summary() function to compute mean, max, or min inflammation per patient, and developing the detect_problems() function to check for zero-mean patient values using the provided check_zeros() helper. I also corrected issues such as indentation errors and a misspelled NumPy keyword.
What did you learn from the changes you have made?
Through these updates, I learned how to use NumPy operations along specific axes, how to structure functions that accept dynamic parameters, and how to interpret and resolve common Python errors such as TypeErrors and indentation problems. I also gained practice integrating multiple functions together to create a small analysis pipeline.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I considered creating separate helper functions for each summary operation (e.g., mean_summary(), max_summary()), but ultimately kept the logic inside a single patient_summary() to reduce repetition and simplify the API. I also briefly considered adding file validation steps but focused on meeting the assignment requirements.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Yes, I initially encountered issues with indentation, which caused certain blocks of logic to become unreachable, and with a misspelled keyword (axi instead of axis) that produced a NumPy TypeError. I resolved these issues by reviewing error messages carefully, checking NumPy documentation, and verifying code structure step-by-step.
How were these changes tested?
I tested the functions by loading the inflammation dataset and confirming the expected array shape, validating that summary outputs from patient_summary() had the correct length (60 patients), and running each operation type (mean, max, min). I also tested detect_problems() across several CSV files to confirm correct detection of zero-mean patients. All assignment-provided tests passed successfully.
A reference to a related issue in your repository (if applicable)
N/A
Checklist