Repository navigation
Fix singleton squeeze to preserve array views - #9276
Merged
Merged
Conversation
numpydoc's make_xref with numpydoc_xref_param_type=True splits the
parameter type on spaces/or/commas. The bare word 'of' in
'int or tuple of int, optional' becomes an unresolvable :obj: reference
under nitpicky=True, failing the CI docs build.
Rewrite as PEP 585 subscript 'tuple[int, ...]' which is the established
PyVista convention (e.g. pointset.py, composite.py) and avoids the
unresolvable 'of' reference. All other tokens in the type field are
resolved via intersphinx (python:int, python:tuple) or explicitly
ignored via nitpick_ignore_regex ('optional').
Docstring-only change; no logic, signature, or behavior change.
akaszynski
approved these changes
Sep 19, 2026
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.
Overview
Resolves #3653.
pyvista_ndarray.squeeze()andnp.squeeze()retain zero-dimensional array views for singleton inputs, including complex dataset arrays, so writes continue to update the owning dataset. Reductions still return scalars.The ndarray and datasetattributes core modules pass on NumPy 1.26.4 and 2.4.6 (240 passed, 3 skipped each). Changed-file lint and docstyle pass. Full doctests pass 1,701 cases, with the same five failures as
main; full-project lint, docstyle and type-check diagnostics also match the baseline.Codex drafted the code, tests, documentation, and PR description, ran the local checks, and provided an independent agent review; I have reviewed and understand the changes.
Generated with OpenAI Codex.