Skip to content

fix broadcasting behavior in ndimage.measurements functions - #4151

Merged
mergify[bot] merged 1 commit into
cupy:masterfrom
grlee77:ndimage_measurements_sum_mean_fix
Oct 21, 2020
Merged

mergify[bot] merged 1 commit into
cupy:masterfrom
grlee77:ndimage_measurements_sum_mean_fix

Conversation

@grlee77

@grlee77 grlee77 commented Oct 19, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Jenkins, test this please

@chainer-ci

Copy link
Copy Markdown
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
Copy Markdown
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