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

Implement “excluded” option in vectorize.py #8287

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RyanI70I
Copy link

Why:
Fixes #8166
TLDR: Implements a option numpy recently introduced in vectorize.py

How: Take the arguments for the vectorized function and copy the “excluded” parameters into a data structure that is the same shape as the non-”excluded” parameters. Pass these modified args into the function generated by ElementwiseKernel like normal.

@takagi takagi added cat:enhancement Improvements to existing features prio:medium labels Apr 12, 2024
@asi1024
Copy link
Member

asi1024 commented Apr 14, 2024

This seems to only support for excluded arrays with x.size == 1.

@RyanI70I
Copy link
Author

I tried making 2 testcases with the excluded array being different shapes, but I wasn't able to find the problem

Do you have a test case in mind that exposes this?

@asi1024
Copy link
Member

asi1024 commented Apr 22, 2024

In your two new test cases, the excluded option seems to be internally disabled. Could you add another test for inputs that cannot be broadcast?

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 prio:medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cupy.vectorize currently does not support "excluded" option
3 participants