Skip to content

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented May 15, 2025

The stock NumPy returns incorrect result for numpy.spacing(-0.0), while Intel NumPy returns the expected one (the same as dpnp also).
It might be the case when dpnp test is running with the stock NumPy. Thus the PR add a conditional check to update expected result in TestSpacing::test_zeros in case when non-Intel NumPy is used.

Previously the same logic was based on NumPy version, assuming Intel NumPy has always version < "2.0.0", but it is not the case anymore.

  • 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?

@antonwolfy antonwolfy self-assigned this May 15, 2025
@antonwolfy antonwolfy force-pushed the resolve-issue-with-spacing-tests branch 2 times, most recently from 5a85c7b to d2c672e Compare May 15, 2025 12:01
Copy link
Contributor

github-actions bot commented May 15, 2025

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

@coveralls
Copy link
Collaborator

coveralls commented May 15, 2025

Coverage Status

coverage: 71.711%. remained the same
when pulling 8b100d9 on resolve-issue-with-spacing-tests
into fdf9ba7 on master.

Copy link
Contributor

github-actions bot commented May 15, 2025

Array API standard conformance tests for dpnp=0.18.0dev2=py312he4f9c94_22 ran successfully.
Passed: 1229
Failed: 0
Skipped: 9

@antonwolfy antonwolfy force-pushed the resolve-issue-with-spacing-tests branch from fdf4e21 to a77433a Compare May 15, 2025 13:31
@antonwolfy antonwolfy marked this pull request as draft May 15, 2025 13:31
@antonwolfy antonwolfy force-pushed the resolve-issue-with-spacing-tests branch 2 times, most recently from 8dc2523 to 514947a Compare May 15, 2025 14:26
@antonwolfy antonwolfy force-pushed the resolve-issue-with-spacing-tests branch from 514947a to 1871ca3 Compare May 15, 2025 15:24
@antonwolfy antonwolfy marked this pull request as ready for review May 15, 2025 16:29
Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @antonwolfy!

@antonwolfy antonwolfy merged commit 8cef740 into master May 15, 2025
63 of 68 checks passed
@antonwolfy antonwolfy deleted the resolve-issue-with-spacing-tests branch May 15, 2025 20:43
github-actions bot added a commit that referenced this pull request May 15, 2025
…#2453)

The stock NumPy returns incorrect result for `numpy.spacing(-0.0)`,
while Intel NumPy returns the expected one (the same as dpnp also).
It might be the case when dpnp test is running with the stock NumPy.
Thus the PR add a conditional check to update expected result in
`TestSpacing::test_zeros` in case when non-Intel NumPy is used.

Previously the same logic was based on NumPy version, assuming Intel
NumPy has always `version < "2.0.0"`, but it is not the case anymore. 8cef740
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