improve broadcast_dims to work directly with Dimensions#775
Open
haakon-e wants to merge 1 commit into
Open
Conversation
…on`s and `DimArray`s The `broadcast_dims` function now supports broadcasting over `Dimension`s and references to them, in addition to `AbstractDimArray`s. This allows for more flexibility when broadcasting over combinations of `DimArray`s and `Dimension`s.
Dimensionsbroadcast_dims to work directly with Dimensions
broadcast_dims to work directly with Dimensionsbroadcast_dims to work directly with Dimensions
rafaqz
reviewed
Aug 21, 2024
rafaqz
left a comment
Owner
There was a problem hiding this comment.
Should it also work with DimStack?
| broadcast_dims!(f, similar(first(As), T, dims), As...) | ||
| end | ||
|
|
||
| function broadcast_dims(f, As::Union{AbstractBasicDimArray, Dimensions.Dimension, Type{<:Dimension}, Symbol}...) |
Owner
There was a problem hiding this comment.
Suggested change
| function broadcast_dims(f, As::Union{AbstractBasicDimArray, Dimensions.Dimension, Type{<:Dimension}, Symbol}...) | |
| function broadcast_dims(f, As::Union{AbstractBasicDimArray,Dimension,Type{<:Dimension},Symbol}...) |
Contributor
Author
|
I think so yes -- I'll try to look at this again next week. |
Owner
|
Is it worth finishing this? Would still be nice to have consistency with |
Contributor
Author
|
Thanks for pinging me again. Are there use cases for keeping both? An alternative would be to deprecate |
Owner
|
I think there are still contexts to use a function, like we still have Right now especially one of those is on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #748.