Repository navigation
Add broadcast_arrays - #3217
Merged
Merged
Add broadcast_arrays#3217
Conversation
jakirkham
force-pushed
the
add_broadcast_arrays
branch
from
February 27, 2018 04:08
aab9d9a to
9cf4097
Compare
jakirkham
force-pushed
the
add_broadcast_arrays
branch
2 times, most recently
from
February 27, 2018 04:37
afa53eb to
3a78ec3
Compare
shoyer
approved these changes
Feb 27, 2018
|
|
||
| to_array = asarray | ||
| if subok: | ||
| to_array = asanyarray |
Member
There was a problem hiding this comment.
nit: I would prefer to write this with single assignment, to_array = asanyarray if subok else asarray
Member
Author
There was a problem hiding this comment.
Done.
Though sometimes coverage tools misreport line coverage on ternary expressions as they miss the branch.
jakirkham
force-pushed
the
add_broadcast_arrays
branch
from
February 27, 2018 13:57
3a78ec3 to
d58368d
Compare
Implements `broadcast_arrays` for Dask Arrays. Builds off of all the other `broadcast_*` functions already in `dask.array.core`.
Make `broadcast_arrays` available in the `dask.array` package.
Perform a simple test with `broadcast_arrays` that compares the results from the NumPy implementation with the Dask Array implementation.
About to make it longer and it is already over the line length limit. So go ahead and wrap it in advance.
Simplify the code in `meshgrid` a bit by making use of `broadcast_arrays`, which does all the bookkeeping for broadcasting the shape and chunks.
Include `broadcast_arrays` for auto-documenting in the `dask.array` public API.
jakirkham
force-pushed
the
add_broadcast_arrays
branch
from
February 27, 2018 17:23
d58368d to
ac2a3ae
Compare
Member
Author
|
Thanks for the reviews. Think this addresses all comments. Also added a test for the no argument case. Please let me know if there is anything else. |
6 tasks done
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.
Fixes #3209
Requires #3218 (for the no argument case)
Implements
broadcast_arraysfor Dask Arrays.