Skip to content

Fix (M, N[, ...]) ndarray docstub error (11). - #8037

Merged
stefanv merged 23 commits into
scikit-image:mainfrom
mkcor:docstub-fixes-11
Nov 11, 2026
Merged

stefanv merged 23 commits into
scikit-image:mainfrom
mkcor:docstub-fixes-11

Conversation

@mkcor

@mkcor mkcor commented Jan 24, 2026

Copy link
Copy Markdown
Member

Description

Orthogonal to #8033.

Checklist

Release note

For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.

...

@mkcor mkcor added 🔧 type: Maintenance Refactoring and maintenance of internals 🧩 typing Type annotations, type checking, and stubs labels Jan 24, 2026
@mkcor
mkcor requested a review from lagru January 24, 2026 16:22
Comment thread src/skimage/filters/thresholding.py Outdated
Returns
-------
threshold : float or int or array
threshold : float or int or ndarray

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that, when array_like, the output was specifically a NumPy array.

Comment thread src/skimage/filters/thresholding.py Outdated
image : ndarray of shape (M[, ...])
Grayscale input image.
low : float, or array of same shape as ``image``
low : float or ndarray of shape (M[, ...])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lagru I removed the comma so the second doctype is on an equal footing.

@coderabbitai

This comment was marked as outdated.

Comment thread src/skimage/segmentation/_watershed.py Outdated
Array of same shape as `image`. Only points at which mask == True
will be labeled.
mask : ndarray of shape (M, N[, ...]) and dtype bool, optional
Only points at which ``mask == True`` will be labeled.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was okay not to document the possible use of 0's and 1's; let's encourage users to stick to strict / consistent types (e.g., masks have dtype bool).

matthew-brett and others added 10 commits May 21, 2026 16:34
* origin/main: (254 commits)
  Refactor, document migration utilities (scikit-image#8184)
  ci: improve handling of pr labels (scikit-image#8169)
  Doctest migration in PRs & on all platforms (scikit-image#8141)
  Update SKIP 4 (import hierarchy, backporting, testing) (scikit-image#8097)
  One page per function / class in HTML docs for skimage2 (scikit-image#8154)
  Pin minimum pytest to 9 (scikit-image#8174)
  docs: make source install instructions more discoverable and add build requirements to top level requirements file (scikit-image#8165)
  Drop `--maxfail=5` from local pytest config (scikit-image#8170)
  Use standard C99 static inline instead of `__inline` (scikit-image#8159)
  Fix structural_similarity win_size / gaussian_weights conflict (scikit-image#8162)
  Unwrap seed refactor (scikit-image#8142)
  ci: Remove llvm build and add ccache support on windows (scikit-image#8164)
  Document warn_external in contributing guide (scikit-image#8163)
  CI: Fix emscripten dependencies and clean up wheel test commands (scikit-image#8147)
  Test only changed subpackages (scikit-image#8103)
  Fix nightlies: update deprecated scipy call, fix underdetermined test
  Fix minkowski distanced invocation for SciPy >= 1.18 (scikit-image#8157)
  Port `structural_similarly` to ski2 (scikit-image#8104)
  make spin build requirement a lower bound (scikit-image#8158)
  Drop Python 3.11 Support (scikit-image#8153)
  ...
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Cursor reviewed by MB.
From Stefanv's patch to main
Fixes scikit-image#3831.

Mask any NaNs in the image.

This is a more general fix than in
scikit-image#7176.

```release-note
`unwrap_phase` now handles input images with NaN values, by taking the NaN values to be an implicit mask.  Previously,
the NaN values could cause the code to hang.   Closes scikit-image#3831.
```

---------

Co-authored-by: Lars Grüter <[email protected]>
…ometric' into pre-megamove-integration

* matthew-brett/rephrase-coordinate-in_geometric:
  Attempt rewrite of docstring for clarity.
  Apply suggestions from code review
  Rewrite geometric docstring
  Apply suggestions from code review
  Apply suggestions from code review
  Use and extend Stéfan's rewrite of rotation note
  Remove punctuation at end of single-word list items
  Rewrite _geometric docstrings for SK2 xy-ij change
@matthew-brett
matthew-brett changed the base branch from main to pre-megamove-integration June 19, 2026 19:58
@matthew-brett

This comment was marked as outdated.

matthew-brett and others added 3 commits September 3, 2026 19:07
…ge#8308)

Backport of a69547b onto pre-megamove-integration.

Fixes scikit-image#8307. Closes scikit-image#7623.

plotly 7.0.0 dropped support for kaleido 0.2.1, breaking every gallery
example that calls `plotly.io.show(fig)`. kaleido's 1.x rewrite needs
both a plotly>=6.1.1 floor and a headless Chrome install, which each CI
docs job now provides.

- Bumped `kaleido` from `==0.2.1` to `>=1.0`, so gallery examples render
through headless Chrome instead of the deprecated bundled binary.
- Bumped `plotly` from `>=5.20` to `>=6.1.1`, kaleido's own hardcoded
floor for compatibility with 1.x.
- The GitHub Actions docs job installs Chrome through apt: it runs on
arm64, where neither `plotly_get_chrome` nor
`browser-actions/setup-chrome` can provision Chrome (Chrome for Testing
has no Stable-channel linux-arm64 build yet).
- CircleCI's docs job installs Chrome through apt too, since
`plotly_get_chrome`'s console script isn't reliably on PATH there.

Docs CI tests.

<!-- See
https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes
-->

```release-note
...
```

Assisted-by: Cursor <[email protected]>
@mkcor mkcor added this to the 0.27 milestone Oct 19, 2026
@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

This AI review is meant to assist maintainers with quick spot checks. You don't need to act on it until you hear from a maintainer.

RetriggerView in Greptile

[Low impact] The PR appears safe to merge; the maintenance-branch checks are restored and no new actionable issues were found.

Reviews (3) · Last reviewed commit: "Update docstub error ratchet" · Reviewed by Greptile

lagru added 2 commits November 9, 2026 12:56
Conflicts:
.github/workflows/typing.yml
src/skimage/data/_fetchers.py
src/skimage/filters/ridges.py
src/skimage/filters/thresholding.py
src/skimage/restoration/unwrap.py
src/skimage/segmentation/_watershed.py
src/skimage/transform/_geometric.py
@lagru
lagru changed the base branch from pre-megamove-integration to main November 9, 2026 12:06
Comment thread .github/workflows/test-linux.yaml Resolved
@stefanv
stefanv merged commit 8dd4c63 into scikit-image:main Nov 11, 2026
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 typing Type annotations, type checking, and stubs 🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants