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

Implement snp.broadcast_shapes #146

Closed
Michael-T-McCann opened this issue Dec 22, 2021 · 0 comments · Fixed by #419
Closed

Implement snp.broadcast_shapes #146

Michael-T-McCann opened this issue Dec 22, 2021 · 0 comments · Fixed by #419
Assignees
Labels
enhancement New feature or request priority: low Low priority

Comments

@Michael-T-McCann
Copy link
Contributor

Michael-T-McCann commented Dec 22, 2021

There are times when we would like to know the result of broadcasting a BlockArray against another BlockArray. Note that the docs should already define how this broadcasting will work.

Currently, we do this with

output_shape = (snp.empty(input_shape) * diagonal).shape

Ideally, we could do this by implementing snp.broadcast_shapes so that it works correctly with nested shapes. What makes this hard is that scico.numpy (1) has some complex metaprogramming and (2) circular import problems that stop you from accessing utils.is_nested.

For more context, see #144.

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

Successfully merging a pull request may close this issue.

3 participants