Skip to content

Require NumPy 2.5.4 in median/nanmedian empty kept-dim tests - #3093

Merged
antonwolfy merged 1 commit into
masterfrom
use-numpy-floor-in-median-empty-kept-dim-tests
Oct 12, 2026
Merged

antonwolfy merged 1 commit into
masterfrom
use-numpy-floor-in-median-empty-kept-dim-tests

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

This PR replaces the inline numpy_version() >= "2.5.4" check in TestMedian.test_empty_kept_dim and TestNanMedian.test_empty_kept_dim with the @with_requires("numpy>=2.5.4") marker.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

NumPy 2.5.4 fixed the tuple-axis reduction of median and nanmedian when a kept dimension has size 0, so the tests now require it via with_requires and compare against NumPy unconditionally instead of using an inline version check with a hardcoded result shape.
@antonwolfy antonwolfy added this to the 0.21.0 release milestone Oct 11, 2026
@antonwolfy antonwolfy self-assigned this Oct 11, 2026
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.667%. remained the same — use-numpy-floor-in-median-empty-kept-dim-tests into master

@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev13=np2py314h8d9cdd5_3 ran successfully.
Passed: 1376
Failed: 0
Skipped: 6

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit ac1791d into master Oct 12, 2026
122 of 127 checks passed
@antonwolfy
antonwolfy deleted the use-numpy-floor-in-median-empty-kept-dim-tests branch October 12, 2026 12:23
github-actions Bot added a commit that referenced this pull request Oct 12, 2026
This PR replaces the inline `numpy_version() >= "2.5.4"` check in
`TestMedian.test_empty_kept_dim` and `TestNanMedian.test_empty_kept_dim`
with the `@with_requires("numpy>=2.5.4")` marker. ac1791d
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.

3 participants