Skip to content

[WIP] Add upper_tri and diag_mat affine atoms#54

Draft
Transurgeon wants to merge 1 commit intomainfrom
adds-more-affine-atoms
Draft

[WIP] Add upper_tri and diag_mat affine atoms#54
Transurgeon wants to merge 1 commit intomainfrom
adds-more-affine-atoms

Conversation

@Transurgeon
Copy link
Copy Markdown
Collaborator

Both are thin wrappers that compute flat column-major index arrays and delegate to new_index. diag_mat extracts the diagonal of a square matrix into a vector. upper_tri extracts strict upper triangular elements (excluding diagonal).

Also removes a duplicate new_diag_vec declaration in affine.h.

Both are thin wrappers that compute flat column-major index arrays
and delegate to new_index. diag_mat extracts the diagonal of a
square matrix into a vector. upper_tri extracts strict upper
triangular elements (excluding diagonal).

Also removes a duplicate new_diag_vec declaration in affine.h.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Transurgeon Transurgeon changed the title Add upper_tri and diag_mat affine atoms [Ready for review] Add upper_tri and diag_mat affine atoms Mar 26, 2026
@Transurgeon
Copy link
Copy Markdown
Collaborator Author

@dance858 you can wait before reviewing this.
I encountered a nasty bug about ordering with upper_tri while testing from python.
I think for some reason in python it takes the upper_tri values in row-major order.. I will explore this a bit more before we keep looking at this.

@Transurgeon Transurgeon marked this pull request as draft March 27, 2026 02:50
@Transurgeon Transurgeon changed the title [Ready for review] Add upper_tri and diag_mat affine atoms [WIP] Add upper_tri and diag_mat affine atoms Mar 27, 2026
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.

1 participant