Skip to content

BUG: Fix Dataset.argmax warning and error messages - #11723

Merged
headtr1ck merged 2 commits into
pydata:mainfrom
nightcityblade:fix/issue-11721-argmax
Oct 14, 2026
Merged

headtr1ck merged 2 commits into
pydata:mainfrom
nightcityblade:fix/issue-11721-argmax

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Description

Fix the Dataset.argmax() deprecation warning and invalid-dimension error messages, which incorrectly referred to argmin because of a copy-paste mistake. Add focused regression coverage for both messages.

This addresses one small-cleanup item in #11721; it does not close the full tracking issue.

Checklist

  • Closes #xxxx — N/A; Tracking: open deprecations #11721 tracks multiple independent deprecation cleanups.
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst — N/A; no API was added.

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: OpenAI Codex
      Prompt: Fix the issue-backed Dataset.argmax() copy-paste message bug, add focused tests and a release note, and run relevant tests and lint.

@headtr1ck headtr1ck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That test is not really useful, you can just drop it.

@nightcityblade

Copy link
Copy Markdown
Contributor Author

Removed the message-specific test as requested and kept the PR focused on the implementation and release note. I amended the existing commit (5853eb7). Validation: the focused Dataset reduction tests pass (2 passed), and Ruff check/format plus git diff --check pass.

@nightcityblade

Copy link
Copy Markdown
Contributor Author

CI follow-up: the minimum-versions job's only failure is an unrelated Zarr/Blosc decompression error in TestZarrRegionAuto::test_zarr_region_chunk_partial_offset[2] after 22,061 tests passed. The same matrix job passed on the prior revision. I attempted to rerun the failed job, but GitHub restricts reruns here to repository admins; a maintainer rerun should confirm it is transient.

@headtr1ck

Copy link
Copy Markdown
Collaborator

You can ignore the error, it's fixed in #11727

@headtr1ck headtr1ck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thx!

@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 14, 2026
@headtr1ck
headtr1ck enabled auto-merge (squash) October 14, 2026 06:28
Co-authored-by: Claude <noreply@anthropic.com>
@headtr1ck
headtr1ck merged commit 04c9819 into pydata:main Oct 14, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants