-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add diagonal operator mapping base operator over an array axis #521
Conversation
scico/linop/_stack.py
Outdated
@@ -146,6 +147,83 @@ def _adj(self, y: Union[Array, BlockArray]) -> Union[Array, BlockArray]: # type | |||
return snp.blockarray(result) | |||
|
|||
|
|||
class DiagonalReplicated(DReplicated, LinearOperator): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It takes a second to figure out what DReplicated
is here. Consider DiagonalReplicatedOperator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you noticed that this is an alias for operator.DiagonalReplicated
. You don't have similar concerns for DStack
and VStack
? If DReplicated
is changed as suggested, it would seem to make sense to modify them too for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed as discussed.
Add diagonal operator mapping base operator over an array axis via
jax.pmap
orjax.vmap
.Resolves #413.