Repository navigation
DOC: fix incomplete parameter description and examples in as_strided - #33103
Open
pereradrian wants to merge 1 commit into
Open
pereradrian wants to merge 1 commit into
pereradrian wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
PR summary
Small fixes to the
numpy.lib.stride_tricks.as_strideddocstring:xwas an incomplete sentence ("Array to create a new."); it now reads "Array to create a new view of."check_boundsis now marked as optional, with its default (None, no check) documented.strides=(8,)andstrides=(400,), which assume an 8-byte integer dtype and contradict the Notes, which advise basing new strides onx.strides. They now usex.stridesand50 * a.strides[0]....continuation lines. They now use>>>prompts, as in the rest of the docs.The last example now shows
c(array([ 0, 50])) instead ofc[0], c[1], so the output does not depend on how NumPy scalars are printed.Documentation-only change; no behavior changes.
First time contributor introduction
This is my third PR, after #33092 and #33094. I use Python for work, for my studies and for personal projects.
AI Disclosure
I used Claude (Anthropic) to review the
as_strideddocstring, draft these fixes and draft this PR description. I reviewed every change and ran the updated examples withdoctest, and I take responsibility for the change. I'll handle all review discussion myself.