Skip to content

Update namedtuple field names for linalg.qr and linalg.svd #313

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 1 commit into from
Nov 5, 2021

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 5, 2021

This PR

  • resolves Named tuple field names of linear algebra functions #295.
  • updates namedtuple field names for linalg.qr and linalg.svd. Previously, all namedtuple field names throughout the specification were lowercase for internal consistency. However, this was considered problematic for two reasons: (1) PyTorch is currently the only library supporting the specification in returning namedtuples and had already chosen to capitalize certain field names (e.g., (Q,R) in linalg.qr). Thus, requiring lowercase field names would introduce a breaking change. (2) For certain operations, capitalization allows matching mathematical naming conventions. Accordingly, this PR adopts PyTorch's naming conventions. Namely, (Q,R) for QR decomposition and (U,S,Vh) for singular value decomposition.

@kgryte kgryte added Maintenance Bug fix, typo fix, or general maintenance. API change Changes to existing functions or objects in the API. topic: Linear Algebra Linear algebra. labels Nov 5, 2021
@kgryte kgryte added this to the v2021 milestone Nov 5, 2021
@kgryte
Copy link
Contributor Author

kgryte commented Nov 5, 2021

As the changes proposed in the PR were discussed and agreed upon during today's call (4 November 2021), will merge. If any further changes are necessary, they can be addressed in follow-up PRs.

@kgryte kgryte merged commit c08d302 into main Nov 5, 2021
@kgryte kgryte deleted the namedtuple-fields branch November 5, 2021 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Changes to existing functions or objects in the API. Maintenance Bug fix, typo fix, or general maintenance. topic: Linear Algebra Linear algebra.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Named tuple field names of linear algebra functions
1 participant