Add runnable scripts to numpy-reshape materials#788
Open
realpython-bot wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stephengruppetta
approved these changes
Jun 26, 2026
Contributor
Author
|
Reviewed and ready to merge — needs a maintainer with merge rights. I verified this PR end-to-end:
This folder is the download target for the live opt-in on the tutorial ( I could not merge it myself — the |
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.
Adds script versions of the code from Using NumPy reshape() to Change the Shape of an Array, following the current practice of shipping runnable
.pyfiles in the materials repo (this folder was previously image-only).Added
array_shape.py,change_shape.py,reduce_dimensions.py,increase_dimensions.py,compatible_shapes.py,order_parameter.py,color_image.py,wildcard.pyrequirements.txt(numpy==2.5.0, Pillow==12.2.0)Updated
README.mddocuments the scriptsAll scripts were verified running on numpy 2.5.0 / Pillow 12.2.0. Scripts that use random data seed the generator for reproducible output.
🤖 Generated with Claude Code