Skip to content

add ravel_multi_index - #3104

Merged
mergify[bot] merged 12 commits into
cupy:masterfrom
grlee77:ravel_multi_index
Feb 25, 2020
Merged

mergify[bot] merged 12 commits into
cupy:masterfrom
grlee77:ravel_multi_index

Conversation

@grlee77

@grlee77 grlee77 commented Feb 20, 2020

Copy link
Copy Markdown
Member

This PR adds cupy.ravel_multi_index

order=None is equivalent to order='C'

return TypeError not ValueError for unrecognized order

handle boolean dtype correctly
@niboshi niboshi added the cat:feature New features/APIs label Feb 21, 2020
@emcastillo emcastillo self-assigned this Feb 21, 2020
@emcastillo emcastillo added this to the v8.0.0b1 milestone Feb 21, 2020
Comment thread cupy/indexing/generate.py
array([12, 13, 13])
>>> cupy.ravel_multi_index(cupy.asarray((3,1,4,1)), (6,7,8,9))
array(1621)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a note like in the other functions that may synchronize the device

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Please check now (I think this can only occur when mode='raise'?)

Comment thread cupy/indexing/generate.py Resolved
Comment thread cupy/indexing/generate.py Resolved
@emcastillo

Copy link
Copy Markdown
Member

Jenkins, test this please

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit f2657ad:

@emcastillo emcastillo added the st:test-and-merge (deprecated) Ready to merge after test pass. label Feb 25, 2020
@grlee77

grlee77 commented Feb 25, 2020

Copy link
Copy Markdown
Member Author

I noticed #3098 after submitting this. Should I be refactoring tests to not use numpy_cupy_raises? If so I can either do it now or as a follow-up PR.

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit f2657ad, target branch master) failed with status FAILURE.

@grlee77

grlee77 commented Feb 25, 2020

Copy link
Copy Markdown
Member Author

The latest commit should have fixed the single CI failure, please retry

@emcastillo

Copy link
Copy Markdown
Member

I noticed #3098 after submitting this. Should I be refactoring tests to not use numpy_cupy_raises? If so I can either do it now or as a follow-up PR.

Should be ok!

@emcastillo

Copy link
Copy Markdown
Member

Jenkins, test this please

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 601341c:

@chainer-ci

Copy link
Copy Markdown
Member

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

@mergify
mergify Bot merged commit a92d316 into cupy:master Feb 25, 2020
@grlee77
grlee77 deleted the ravel_multi_index branch September 9, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:feature New features/APIs st:test-and-merge (deprecated) Ready to merge after test pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants