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

dpnp.where() doesn`t work with 1 argument #1326

Merged

Conversation

vlad-perevezentsev
Copy link
Collaborator

Now where operator supports passing a single condition argument and repeats the behavior of numpy.where() with a single argument by calling dpnp.nonzero()
Also adds bool type support for non_zero functions.

This PR is fixing issue reported in #1242

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

@oleksandr-pavlyk
Copy link
Contributor

LGTM from quickly browsing through the code.

@vlad-perevezentsev
Copy link
Collaborator Author

LGTM!
I have checked the change on my laptop and it works great.
Thanks @antonwolfy

@antonwolfy antonwolfy force-pushed the fix_where_operator branch from 358c67a to 7ad9733 Compare March 5, 2023 22:31
@antonwolfy antonwolfy merged commit bb01f05 into IntelPython:master Mar 6, 2023
@vlad-perevezentsev vlad-perevezentsev deleted the fix_where_operator branch August 10, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants