Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use amin/amax from numpy #995

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

henryiii
Copy link
Contributor

NumPy provides amin and amax (array min, array max), you should not use min and max in new code. The problem is that from numpy import * causes min and max to be replaced by these NumPy versions. Some highlighters also don't like numpy.min and highlight the min as if it's a builtin. Finally, the NumPy docs for min just point at amin (and amin docs don't even include min in the see also). And only amin/amax show up in the sidebar.

henryiii and others added 2 commits June 10, 2022 12:07
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@noatgnu noatgnu merged commit 27315f7 into swcarpentry:gh-pages Mar 21, 2023
@henryiii henryiii deleted the henryiii/fix/anumpy branch March 21, 2023 18:52
zkamvar pushed a commit that referenced this pull request Apr 21, 2023
fix: use amin/amax from numpy

Hi @henryiii ,

Thank you for the pull request. Since numpy.min and numpy.max don't actually exist on the official documentation so it would also make sense to change them to numpy.amin and numpy.amax in the lesson.
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.

2 participants