-
Notifications
You must be signed in to change notification settings - Fork 37
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 broadcast_axis
#133
Conversation
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 85.68% 85.91% +0.22%
==========================================
Files 9 10 +1
Lines 1411 1434 +23
==========================================
+ Hits 1209 1232 +23
Misses 202 202
Continue to review full report at Codecov.
|
Does this look good for now? It lacks the context of the entire broadcasting system but I figured it would be more manageable to approach it in a series of small PRs. Also, |
There are a few re-implementations of broadcasting within the package ecosystem. Two include:
I think we should look to these and what they need to decide what can be done to help them. Aside from these packages (any others?), what are the goals/objectives here? |
|
Currently Julia puts most of the responsibility of handling axes on the array provider. But arrays can provide different types of axes and they interact in one of the following ways
'indices' and 'eachindex' are specific instances for combining them and aren't necessarily suited for reconstructing axes in place for a new array. I actually was looking at those packages when doing these and I haven't found anything that does exactly this. I think it would make sense to change the upstream function from |
I should probably give some more context for this. Whether the broadcasting struct (something like It also helps with #130, where we might not actually be broadcasting something bet we are performing some sort of operation on two arrays that needs a destination that isn't a fully materialized array. |
Was the consensus that I needed to address how we're going to interact with the entirety broadcasting before moving forward with this? |
Sorry for being slow here. What is the interface/way for someone to use this? Is it something someone opts into by defining new range types (returned by |
The big pictures is that I'm trying to get a coherent interface for breaking down arrays into their memory and structural layout so we can have generic methods that help us reconstruct arrays (like I've packaged the code I've been working on around related to this here. This line is where broadcasting stuff starts to diverge from
We could just us a different subtype of |
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.
Okay, sounds good.
This is essentially a formalization of _bcs1 that is called within the
combine_axes
function for broadcasting.I'm sure we want to do some more stuff for broadcasting later, but for now I'm just trying to get some basic stuff in for combining axes. I'm not sure if we want the function that iteratively calls
broadcast_axis
to becombine_axes
. We may want something more likecombine_layout
so that it can can account for reconstructing various types of sparsely populated arrays, which would involve more than just axes.