Skip to content

Fix boolean mask asignment scalar#1101

Merged
oleksandr-pavlyk merged 2 commits intomasterfrom
fix-boolean-mask-asignment-scalar
Mar 6, 2023
Merged

Fix boolean mask asignment scalar#1101
oleksandr-pavlyk merged 2 commits intomasterfrom
fix-boolean-mask-asignment-scalar

Conversation

@oleksandr-pavlyk
Copy link
Copy Markdown
Contributor

Fix for

import dpnp
x = dpnp.random.randn(200)
x[x<0] = 0   # used to raise TypeError, expecting r.h.s. to be a 0-d usm_ndarray 
  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an 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?

This allows `x[x<0] = 0` to work. Previously, it had to be `x[x<0] = dpt.asarray(0)`.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2023

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage: 82.378% (+0.02%) from 82.363% when pulling c162c2a on fix-boolean-mask-asignment-scalar into d259247 on master.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2023

Array API standard conformance tests for dpctl=0.14.1dev3=py310h76be34b_5 ran successfully.
Passed: 36
Failed: 798
Skipped: 280

@oleksandr-pavlyk oleksandr-pavlyk merged commit 2f8156c into master Mar 6, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-boolean-mask-asignment-scalar branch March 6, 2023 15:01
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2023

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2023

Array API standard conformance tests for dpctl=0.14.1dev3=py310h76be34b_5 ran successfully.
Passed: 36
Failed: 798
Skipped: 280

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