Skip to content

Return named tuple for linalg functions per python array API #2276

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

Merged
merged 14 commits into from
Feb 11, 2025

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Jan 23, 2025

The PR proposes to return namedtuple for linalg functions: qr, eig, eigh, svd and slogdet.
The namedtuple as a return type there is mandated to be compliant with python array API.

The tests are updated to cover namedtyple as a return type of affected function.
Also this PR requires to patch how napoleon extension from sphinx handles docstring description of namedtuple. The handling was align with NumPy approach.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@antonwolfy antonwolfy self-assigned this Jan 23, 2025
@coveralls
Copy link
Collaborator

coveralls commented Jan 23, 2025

Coverage Status

coverage: 71.589% (+0.02%) from 71.572%
when pulling fb53232 on add-namedtuple-linalg
into 0c455a6 on master.

@antonwolfy antonwolfy force-pushed the add-namedtuple-linalg branch from b613691 to e2e08fa Compare February 6, 2025 17:27
Copy link
Contributor

github-actions bot commented Feb 7, 2025

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

@antonwolfy antonwolfy force-pushed the add-namedtuple-linalg branch from d3036f9 to 5fc7c1a Compare February 7, 2025 17:17
Copy link
Contributor

github-actions bot commented Feb 7, 2025

Array API standard conformance tests for dpnp=0.17.0dev6=py312he4f9c94_20 ran successfully.
Passed: 977
Failed: 0
Skipped: 23

@antonwolfy antonwolfy marked this pull request as ready for review February 7, 2025 19:54
@IntelPython IntelPython deleted a comment from github-actions bot Feb 7, 2025
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 898b6f2 into master Feb 11, 2025
69 of 70 checks passed
@antonwolfy antonwolfy deleted the add-namedtuple-linalg branch February 11, 2025 18:39
github-actions bot added a commit that referenced this pull request Feb 11, 2025
The PR proposes to return namedtuple for linalg functions: `qr`, `eig`,
`eigh`, `svd` and `slogdet`.
The namedtuple as a return type there is mandated to be compliant with
python array API.

The tests are updated to cover namedtyple as a return type of affected
function.
Also this PR requires to patch how napoleon extension from sphinx
handles docstring description of namedtuple. The handling was align with
NumPy approach. 898b6f2
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