-
Notifications
You must be signed in to change notification settings - Fork 55
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
Features/173 stack #608
Features/173 stack #608
Conversation
Codecov Report
@@ Coverage Diff @@
## master #608 +/- ##
==========================================
+ Coverage 97.49% 97.52% +0.02%
==========================================
Files 77 77
Lines 15877 16102 +225
==========================================
+ Hits 15480 15704 +224
- Misses 397 398 +1
Continue to review full report at Codecov.
|
bump, merge conflicts |
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.
Looks good, I tried playing around with it a bit, didn't come accross any problems.
Only the docstring amendment
heat/core/manipulations.py
Outdated
|
||
The ``axis`` parameter specifies the index of the new axis in the dimensions of the result. | ||
For example, if ``axis=0``, the arrays will be stacked along the first dimension; if ``axis=-1``, | ||
they will be stacked along the last dimension. |
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.
Maybe include the note on the split that you mention above in the PR description. That is very useful to know i believe
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.
You're absolutely right. I've added a Notes section about split semantics and references to it in the text.
Description
Implementation of
ht.stack()
,ht.column_stack()
, andht.row_stack()
.ht.stack(arrays, axis)
joins a sequence of DNDarrays along a newly created dimension, specified by the argumentaxis
. It usestorch.stack()
under the hood. Even in the distributed case, no communication is required, since the stacking by definition happens along a new axis, and the conditionsplit == axis
is therefore never verified.Distribution of output:
stack()
requires that all arrays in the sequence be split along the same dimension. After stacking, the data are still distributed in the original dimension, however a new dimension has been added, so the original dimension might now besplit+1
:axis <= split
, output is distributed alongsplit+1
axis > split
, output is distributed alongsplit
ht.column_stack(arrays)
andht.row_stack(arrays)
stack 1-D or 2-D DNDarrays as columns or rows, respectively, into 2-D DNDarrays. In practice, they stack, if all arrays are 1-D, or concatenate, if at least one of the arrays is 2-D.Issue/s resolved: #173, #544
Changes proposed:
Type of change
Due Diligence
Does this change modify the behaviour of other functions? If so, which?
no