Skip to content

Fix argmin/argmax dtype argument#2872

Merged
emcastillo merged 3 commits intocupy:masterfrom
niboshi:argminmax-dtype
Dec 26, 2019
Merged

Fix argmin/argmax dtype argument#2872
emcastillo merged 3 commits intocupy:masterfrom
niboshi:argminmax-dtype

Conversation

@niboshi
Copy link
Copy Markdown
Member

@niboshi niboshi commented Dec 24, 2019

Fixes #2595
Requires #2870

@niboshi niboshi added cat:bug Bugs to-be-backported Pull-requests to be backported to stable branch labels Dec 24, 2019
('d->q', (None, 'my_argmin_float(a, b)', None, None)),
('F->q', (None, 'my_argmin_float(a, b)', None, None)),
('D->q', (None, 'my_argmin_float(a, b)', None, None))),
tuple(['{}->{}'.format(d, r) for r in 'bhilq' for d in '?BhHiIlLqQ'])
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.

I am a bit concerned with the order 'bhilq'. Which return type is chosen when argmin(..., dtype=None, ...) is called? I thought we'd need to put 'q' as the leading character to match NumPy default, but I could be wrong. (I don't have access now to test this PR.)

Copy link
Copy Markdown
Member Author

@niboshi niboshi Dec 24, 2019

Choose a reason for hiding this comment

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

Thank you for pointing out! It seems you are correct. Some of the tests were failing.
Fixed in eb90e95.

@leofang
Copy link
Copy Markdown
Member

leofang commented Dec 24, 2019

To close #2595, it'd be nice to document the API deviation (which is a good thing I think).

@emcastillo emcastillo self-assigned this Dec 26, 2019
Copy link
Copy Markdown
Member

@emcastillo emcastillo left a comment

Choose a reason for hiding this comment

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

LGTM

@emcastillo
Copy link
Copy Markdown
Member

Waiting till #2870 is merged

@emcastillo emcastillo added the st:blocked-by-another-pr Blocked by another pull-request label Dec 26, 2019
@niboshi
Copy link
Copy Markdown
Member Author

niboshi commented Dec 26, 2019

#2870 merged.

@emcastillo
Copy link
Copy Markdown
Member

Jenkins, test this please

@pfn-ci-bot
Copy link
Copy Markdown
Collaborator

Successfully created a job for commit ecb3e72:

@chainer-ci
Copy link
Copy Markdown
Member

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

@emcastillo emcastillo merged commit 837d2a6 into cupy:master Dec 26, 2019
emcastillo pushed a commit to emcastillo/cupy that referenced this pull request Dec 26, 2019
Fix `argmin`/`argmax` `dtype` argument
@niboshi niboshi deleted the argminmax-dtype branch December 26, 2019 07:09
emcastillo pushed a commit to emcastillo/cupy that referenced this pull request Dec 26, 2019
Fix `argmin`/`argmax` `dtype` argument
@asi1024 asi1024 added this to the v8.0.0a1 milestone Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:bug Bugs st:blocked-by-another-pr Blocked by another pull-request to-be-backported Pull-requests to be backported to stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signatures and behaviors of argmax and argmin are incompatible with NumPy

6 participants