Skip to content

Replace numpy.amax and numpy.amin with numpy.max and numpy.min throughout#1119

Open
edbennett wants to merge 2 commits intoswcarpentry:mainfrom
edbennett:amax-to-max
Open

Replace numpy.amax and numpy.amin with numpy.max and numpy.min throughout#1119
edbennett wants to merge 2 commits intoswcarpentry:mainfrom
edbennett:amax-to-max

Conversation

@edbennett
Copy link
Copy Markdown
Contributor

Per the discussion in #1117, this PR instead replaces all instances of numpy.amax and numpy.amin with numpy.max and numpy.min respectively. This matches the current recommended and most common convention for computing the maximum and minimum with Numpy, and avoids a source of cognitive load.

Since I had already recreated the illustration for #1117, this also redraws the previously PNG figure as an SVG.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

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:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/swcarpentry/python-novice-inflammation/compare/md-outputs..md-outputs-PR-1119

The following changes were observed in the rendered markdown documents:

 02-numpy.md                                 | 38 +++++---------
 03-matplotlib.md                            | 22 ++++----
 06-files.md                                 |  8 +--
 07-cond.md                                  | 18 +++----
 08-func.md                                  | 22 ++++----
 10-defensive.md                             |  2 +-
 12-cmdline.md                               | 24 ++++-----
 discuss.md                                  |  2 +-
 fig/generate_figures.py                     | 12 ++---
 fig/python-operations-across-axes.svg (new) | 79 +++++++++++++++++++++++++++++
 files/code/readings_04.py                   |  4 +-
 files/code/readings_05.py                   |  4 +-
 files/code/readings_06.py                   |  4 +-
 files/code/readings_07.py                   |  4 +-
 files/code/readings_08.py                   |  4 +-
 files/code/readings_09.py                   |  4 +-
 md5sum.txt                                  | 16 +++---
 17 files changed, 167 insertions(+), 100 deletions(-)
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-28 19:52:07 +0000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant