-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added missing dpnp.column_stack
, dpnp.dstack
and dpnp.row_stack
#1647
Conversation
View rendered docs @ https://intelpython.github.io/dpnp/pull//index.html |
Co-authored-by: vtavana <120411540+vtavana@users.noreply.github.com>
Co-authored-by: vtavana <120411540+vtavana@users.noreply.github.com>
Input array data types are limited by supported DPNP :ref:`Data types`. | ||
Parameters | ||
---------- | ||
dst : {dpnp.ndarray, usm_ndarray} |
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.
Same as for broadcast_arrays
sequence of {dpnp.ndarray, usm_ndarray}
?
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.
no, because dst
is an array, but not a sequence of arrays
:obj:`dpnp.hstack` : Stack arrays in sequence horizontally (column wise). | ||
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array. | ||
:obj:`dpnp.stack` : Join a sequence of arrays along a new axis. | ||
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks. |
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.
dpnp does not have block
implementation.
Is this line added for the future?
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.
yep
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array. | ||
:obj:`dpnp.stack` : Join a sequence of arrays along a new axis. | ||
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks. | ||
:obj:`dpnp.dsplit` : Split array along third axis. |
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.
Same
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.
yep, same
@@ -1153,19 +1351,14 @@ def result_type(*arrays_and_dtypes): | |||
|
|||
Parameters |
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.
result_type(*arrays_and_dtypes)
in docstings can be removed, can not it?
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.
no, because it suppress a possible warning generated by flake8
here (the 1st string in the docstring must be one-lined string).
in the generated documentation the line result_type(*arrays_and_dtypes)
is a signature of the function
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.
LGTM!
Thanks @antonwolfy
The PR proposes to implement missing manipulation functions:
dpnp.column_stack
,dpnp.dstack
anddpnp.row_stack
- to close function gap for arrays join relating use cases.Additionally the PR includes changes to complete description of all input arguments to existing manipulation functions and to align all of them to one style.