Skip to content

Support torch.linalg.diagonal #62813

@AnirudhDagar

Description

@AnirudhDagar

🚀 Feature

Support torch.linalg.diagonal alias to torch.diagonal.

cc @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi @heitorschueroff

Motivation & Pitch

Python Array API proposes the use of linalg.diagonal among other linear algebra functions. Currently, PyTorch supports the same functionality with torch.diagonal. Array-API Ops tracker (#58742) lists a few aliases and it would be nice to add an alias torch.linalg.diagonal to torch.diagonal making it compliant with Array API.

Additional context

Metadata

Metadata

Assignees

Labels

module: python array apiIssues related to the Python Array APItriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions