Skip to content

Fix incorrect parameter name in cumulative() docstrings - #11425

Merged
dcherian merged 1 commit into
pydata:mainfrom
Sreekant13:fix/cumulative-docstring-param-name
Jul 2, 2026
Merged

Fix incorrect parameter name in cumulative() docstrings#11425
dcherian merged 1 commit into
pydata:mainfrom
Sreekant13:fix/cumulative-docstring-param-name

Conversation

@Sreekant13

@Sreekant13 Sreekant13 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

The docstrings for DataArray.cumulative and Dataset.cumulative document the parameter as dims, but the actual signature parameter is dim. As a result, calling obj.cumulative(dims=...) raises a TypeError even though the docs show
dims. This corrects dimsdim in both Parameters sections to match the signature. Documentation-only change; no behavior change.

Checklist

  • Closes #xxxx
  • Tests added
  • User visible changes documented in whats-new.rst
  • New functions/methods listed in api.rst

(Docstring-only correction — no tests, whats-new, or api.rst entry needed.)

AI Disclosure

  • This PR contains AI-generated content.
  • I have tested any AI-generated content in my PR.
  • I take responsibility for any AI-generated content in my PR.
    Tools: Claude (Claude Code) was used to help identify the docstring/signature mismatch. I reviewed the change against the cumulative signatures in both dataarray.py and dataset.py, confirmed dim is the correct parameter name, and take full responsibility for the change.

@Sreekant13

Copy link
Copy Markdown
Contributor Author

Heads-up: the failing docs/readthedocs.org:xray check looks unrelated to this change. The build fails during environment setup at the pixi install -e doc step (before any docs are rendered), and the same docs/readthedocs.org:xray
status is currently failing on all the other open PRs I checked. So it appears to be a repo-wide docs-build issue rather than anything in this PR.

This is a documentation-only change (dimsdim in two docstrings); happy to rebase or re-run once the docs build is healthy again. Thanks!

@dcherian
dcherian merged commit 71138a7 into pydata:main Jul 2, 2026
42 of 43 checks passed
@welcome

welcome Bot commented Jul 2, 2026

Copy link
Copy Markdown

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

@Sreekant13

Copy link
Copy Markdown
Contributor Author

Thanks @dcherian! Appreciate you merging this even with the RTD build being flaky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants