Make use of amax and amin more consistent#1117
Make use of amax and amin more consistent#1117edbennett wants to merge 1 commit intoswcarpentry:mainfrom
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-1117 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 2026-04-23 13:28:18 +0000 |
The change in #995 left some instances of
maxandminpresent, which might cause learner confusion. This PR changes all of these that I could find to consistently useamaxandamin. This required redrawing one diagram in SVG, and I made some related changes to using the full words "maximum" or "maxima" rather than "max" to be maximally explicit.That said, I'm not sure that this is the correct course of action. The original intent of #995 was to make the lesson more consistent with the Numpy documentation, which discouraged use of
minand `max. However, this seems to have been slightly premature:aminandamaxare now aliases formaxandmin, and the latter have the full documentation.amin,amaxforms in the documentation.numpy.minandnumpy.maxare not deprecated nor scheduled to be removed, sofrom numpy import *will overwrite our builtin namespace regardless of whether we use theamin,amaxforms or not.minandmaxwork correctly with Dask, whereasaminandamaxnow will not (if I'm reading the discussion correctly)numpy.sum(which we use later in the lesson) do not have non-clashing aliases.Based on this, it might be better to revert the
numpy.aminandnumpy.amaxtonumpy.minandnumpy.max. If that is the preferred option, I can close this and open a fresh PR that does this.