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

[ENHANCEMENT] Define a generic diagonalarray constructor #8

Open
mtfishman opened this issue Jan 28, 2025 · 0 comments
Open

[ENHANCEMENT] Define a generic diagonalarray constructor #8

mtfishman opened this issue Jan 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@mtfishman
Copy link
Member

Define a generic DiagonalArrays.diagonalarray constructor. For standard inputs, like diagonalarray(randn(2), (2, 2)), it will construct a DiagonalArrays.DiagonalArray, but for special kinds of axes like named axes it can construct a NamedDimsArrays.NamedDimsArray or ITensors.ITensor wrapping a DiagonalArray.

Analogous to DiagonalArrays.diagonal introduced in #4 as a generalization of LinearAlgebra.Diagonal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant