Skip to content

Add complex number support to linalg.svd - #561

Merged
rgommers merged 2 commits into
mainfrom
cmplx-linalg-svd
Dec 14, 2022
Merged

Add complex number support to linalg.svd#561
rgommers merged 2 commits into
mainfrom
cmplx-linalg-svd

Conversation

@kgryte

Copy link
Copy Markdown
Contributor

This PR

  • adds complex number support to linalg.svd.
  • updates the allowed data types from real-valued floating-point to any floating-point data type.
  • requires that the output arrays U and Vh must have the same data type as the input array and that S must be unconditionally real.
  • adds an extended description describing the operation.
  • makes explicit that, for matrix stacks, the SVD must be computed for each matrix in the stack.

@kgrytekgryte added API change Changes to existing functions or objects in the API. topic: Complex Data Types Complex number data types. topic: Linear Algebra Linear algebra. labels Dec 12, 2022
@kgrytekgryte added this to the v2022 milestone Dec 12, 2022

@rgommersrgommers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Additions LGTM, nice to have a bit more detail on what the function does. Thanks @kgryte

Returns
-------
..
NOTE: once complex numbers are supported, each square matrix must be Hermitian.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This code comment got removed. I believe that is correct - the comment is wrong. My guess is that it was added when looking at the hermitian boolean keyword for numpy.linalg.svd

@rgommers
rgommers merged commit fdfa5bd into mainDec 14, 2022
@rgommers
rgommers deleted the cmplx-linalg-svd branch December 14, 2022 19:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API changeChanges to existing functions or objects in the API.topic: Complex Data TypesComplex number data types.topic: Linear AlgebraLinear algebra.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kgryte@rgommers