Skip to content
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

fix broadcasting behavior in ndimage.measurements functions #4151

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Oct 19, 2020

The cupyx.scipy.ndimage.measurements functions sum, mean, variance and standard_deviation currently do not broadcast the labels argument properly in all cases.

The call to cupy.broadcast_arrays just needs to precede any calls like input[labels > 0] or input[labels == index] as proposed here.

The test cases added here fail on master, but pass after the changes in this PR.

@emcastillo emcastillo added to-be-backported Pull-requests to be backported to stable branch st:test-and-merge (deprecated) Ready to merge after test pass. labels Oct 21, 2020
@emcastillo
Copy link
Member

Jenkins, test this please

@chainer-ci
Copy link
Member

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

@mergify mergify bot merged commit d662747 into cupy:master Oct 21, 2020
@chainer-ci
Copy link
Member

@emcastillo This pull-request is marked as to-be-backported, but the corresponding backport PR could not be found. Could you check?

@asi1024 asi1024 added this to the v9.0.0a1 milestone Oct 28, 2020
emcastillo pushed a commit to emcastillo/cupy that referenced this pull request Oct 29, 2020
…an_fix

fix broadcasting behavior in ndimage.measurements functions
@grlee77 grlee77 deleted the ndimage_measurements_sum_mean_fix branch December 18, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:bug Bugs prio:high st:test-and-merge (deprecated) Ready to merge after test pass. to-be-backported Pull-requests to be backported to stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants