Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_issue-2319 #2371

Merged
merged 11 commits into from
Mar 20, 2025
Merged

fix_issue-2319 #2371

merged 11 commits into from
Mar 20, 2025

Conversation

vtavana
Copy link
Collaborator

@vtavana vtavana commented Mar 17, 2025

resolves #2319

The vector norms ord={None, 1, 2, inf} and the matrix norms ord={None, 1, 2, inf, "fro", "nuc"} now consistently return zero for empty arrays, which are arrays with at least one axis of size zero. This change affects dpnp.linalg.norm, dpnp.linalg.vector_norm, and dpnp.linalg.matrix_norm. Previously, dpnp would either raise errors or return zero depending on the parameters provided

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

@vtavana vtavana self-assigned this Mar 17, 2025
Copy link
Contributor

github-actions bot commented Mar 17, 2025

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

Copy link
Contributor

github-actions bot commented Mar 17, 2025

Array API standard conformance tests for dpnp=0.18.0dev0=py312he4f9c94_47 ran successfully.
Passed: 1005
Failed: 0
Skipped: 45

@coveralls
Copy link
Collaborator

coveralls commented Mar 17, 2025

Coverage Status

coverage: 71.773% (+0.01%) from 71.763%
when pulling 71d44f4 on fix-issue-2319
into 4986f39 on master.

@vtavana vtavana marked this pull request as ready for review March 17, 2025 20:01
@antonwolfy antonwolfy added this to the 0.18.0 release milestone Mar 18, 2025
Copy link
Contributor

@antonwolfy antonwolfy 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 @vtavana, LGTM!

@vtavana vtavana merged commit 74b5e54 into master Mar 20, 2025
68 checks passed
@vtavana vtavana deleted the fix-issue-2319 branch March 20, 2025 19:07
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.

dpnp.linalg.vector_norm raises exception for zero sized input array
3 participants