Skip to content

Avoid reshape when materialising DualLayout views of matrices - #294

Open
dlfivefifty wants to merge 1 commit into
masterfrom
dual-matrix-parent
Open

dlfivefifty wants to merge 1 commit into
masterfrom
dual-matrix-parent

Conversation

@dlfivefifty

Copy link
Copy Markdown
Member

_dual_adjoint/_dual_transpose assumed the parent of a DualLayout view is an adjoint/transpose of a vector. When it is a 1×n matrix with DualLayout (e.g. a BlockedMatrix wrapping an adjoint vector), the adjoint is an n×1 matrix and linear indexing into it reshapes, which fails for infinite arrays. Take a column view instead.

`_dual_adjoint`/`_dual_transpose` assumed the parent of a `DualLayout` view
is an adjoint/transpose of a vector. When it is a 1×n matrix with
`DualLayout` (e.g. a `BlockedMatrix` wrapping an adjoint vector), the
adjoint is an n×1 matrix and linear indexing into it reshapes, which fails
for infinite arrays. Take a column view instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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