Fix invalid syntax (N, 2) array: docstub fixes (VII).#8027
Fix invalid syntax (N, 2) array: docstub fixes (VII).#8027mkcor merged 5 commits intoscikit-image:mainfrom
Conversation
📝 WalkthroughWalkthroughDocstrings across feature, measure, and transform modules were updated to explicitly state ndarray shapes (e.g., "ndarray of shape (N, 2)"). The CI typing workflow docstub step had its Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/skimage/feature/orb.py`:
- Line 62: The docstring for the `keypoints` attribute in
src/skimage/feature/orb.py repeats the shape twice; update the `keypoints`
description to remove the redundant `(N, 2)` prefix so it reads in the standard
form (e.g., "ndarray of shape (N, 2)") and ensure similar formatting is used for
other attributes in the same docstring for consistency with the rest of the PR.
🧹 Nitpick comments (1)
src/skimage/transform/_geometric.py (1)
1712-1718: Inconsistent return shape in docstring.The parameter
coordsis documented asarray_like of shape (N, D)to support D-dimensional coordinates, but the return type is documented asarray of shape (N, 2). Since the implementation at line 1722 usesnp.empty_like(coords, np.float64), the output shape matches the input shape.Consider updating the return docstring to match the parameter's dimensionality:
♻️ Suggested fix
Returns ------- - coords : array of shape (N, 2) + coords : ndarray of shape (N, D) Transformed coordinates.
# Conflicts: # .github/workflows/typing.yml
Description
Follows #8026, going through the list of docstub errors, from the bottom up. Fixing similar errors in nearby lines in the same files along the way.
Checklist
./doc/examplesfor new featuresRelease note
For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.