Skip to content

Conversation

pentschev
Copy link
Member

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.

@pentschev pentschev mentioned this pull request May 6, 2019
19 tasks
@pentschev
Copy link
Member Author

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?

@kmaehashi
Copy link
Member

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.
Reviewers will take care of it, so please avoid pushing dummy commit to keep git history clean :)

@kmaehashi
Copy link
Member

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.

@pentschev
Copy link
Member Author

Unfortunately contributors cannot retrigger the test.
Reviewers will take care of it, so please avoid pushing dummy commit to keep git history clean :)

Thanks for letting me know, and sorry for jumping in and pushing that commit unnecessarily.

Copy link
Member

@kmaehashi kmaehashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except commented.

@@ -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'
Copy link
Member

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.

Copy link
Member Author

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.

@pentschev
Copy link
Member Author

Looks like the failure was due to a network issue, could you retrigger @kmaehashi ?

@kmaehashi
Copy link
Member

pfnCI, test this please.

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit e8019a1:

@kmaehashi kmaehashi added cat:enhancement Improvements to existing features to-be-backported Pull-requests to be backported to stable branch labels Jul 16, 2019
@chainer-ci
Copy link
Member

Jenkins CI test (for commit e8019a1, target branch master) succeeded!

Copy link
Member

@toslunar toslunar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pentschev
Copy link
Member Author

Is there anything else to do here, or could this be merged now that NumPy 1.17 is out?

@jakirkham
Copy link
Member

@kmaehashi, is this ok to go in or do you need something else from us?

@pentschev
Copy link
Member Author

I think 6.3.0 should be release soon, right? It would be great if we could have this merged before that!

@kmaehashi kmaehashi merged commit 475d129 into cupy:master Aug 20, 2019
@kmaehashi kmaehashi added this to the v7.0.0b3 milestone Aug 20, 2019
kmaehashi added a commit to kmaehashi/cupy that referenced this pull request Aug 20, 2019
…-support

Support for shape argument in *_like functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:enhancement Improvements to existing features to-be-backported Pull-requests to be backported to stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants