-
-
Notifications
You must be signed in to change notification settings - Fork 947
Support for shape argument in *_like functions #2171
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
Support for shape argument in *_like functions #2171
Conversation
All change requests have been addressed. Please note I had to retrigger the build, due to AppVeyor timing out when downloading NumPy. For future reference, is there a way to trigger another build without pushing a commit? |
Unfortunately contributors cannot retrigger the test. |
This PR implements the spec of unreleased version of NumPy. We agreed to include this into the master branch. This PR can be backported to the stable branch (v6) once after the corresponding version of NumPy has been released. |
Thanks for letting me know, and sorry for jumping in and pushing that commit unnecessarily. |
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 except commented.
cupy/creation/basic.py
Outdated
@@ -55,6 +62,11 @@ def empty_like(a, dtype=None, order='K'): | |||
result. 'C' means C-order, 'F' means F-order, 'A' means 'F' if | |||
``a`` is Fortran contiguous, 'C' otherwise. 'K' means match the | |||
layout of ``a`` as closely as possible. | |||
subok: Not supported yet, must be None. | |||
shape (tuple of ints): Overrides the shape of the result. If order='K' |
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.
Should be int or tuple of ints
.
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.
Sorry for the delay. You're right, I had that copied from the docs of empty
(and similar) that don't include that information. I pushed a new commit to add that missing information to docs of all those functions now.
Looks like the failure was due to a network issue, could you retrigger @kmaehashi ? |
pfnCI, test this please. |
Successfully created a job for commit e8019a1: |
Jenkins CI test (for commit e8019a1, target branch master) succeeded! |
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
Is there anything else to do here, or could this be merged now that NumPy 1.17 is out? |
@kmaehashi, is this ok to go in or do you need something else from us? |
I think 6.3.0 should be release soon, right? It would be great if we could have this merged before that! |
…-support Support for shape argument in *_like functions
Add support for overriding the shape of the input array when calling
empty_like()
, as recently added to NumPy API in numpy/numpy#13046, starting from NumPy 1.17.