Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/swcarpentry/python-novice-inflammation/compare/md-outputs..md-outputs-PR-1096 The following changes were observed in the rendered markdown documents: What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2025-02-27 10:03:04 +0000 |
There was a problem hiding this comment.
Thank you for the suggestion. Please join the conversation at #1085 for more context on upcoming changes discussed on this same part of the lesson and better collaboration and contributions. If this is not a potential conflict to PR #1085, PR #1096 can be merged to lesson material.
Adding some more context for reference -
The issue occurs when the rectangle is wider than it is tall. This fix ensures the aspect ratio is preserved by scaling dy relative to dx when dx > dy. The original code mistakenly used dx/dy, which inverted the proportions. Now, the longest side is always 1.0, and the shorter side is correctly scaled as dy/dx when needed.
|
This is an intended error in the code to trigger the assertion, which is explained in . Changing this would break the rest of the lesson. |
When teaching this section the result was unexpected.
I believe there is a bug in the logic of the code that went undetected so far.
Inverting the scaling factor "fixed the issue" and made the code easier to understand for learners.