Skip to content

Commit

Permalink
fix test_digitize_error (#2204)
Browse files Browse the repository at this point in the history
```python
with pytest.raises(TypeError):
    dpnp.digitize(x_np, bins_dp)
    dpnp.digitize(x_dp, bins_np)  # <= unreachable line
```

```python
with pytest.raises(TypeError):
    dpnp.digitize(x_np, bins_dp)
with pytest.raises(TypeError):
    dpnp.digitize(x_dp, bins_np)  # <= reachable line
```

- [x] Have you provided a meaningful PR description?
- [x] Have you added a test, reproducer or referred to issue with a
reproducer?
- [x] Have you tested your changes locally for CPU and GPU devices?
- [x] Have you made sure that new changes do not introduce compiler
warnings?
- [x] Have you checked performance impact of proposed changes?
- [x] If this PR is a work in progress, are you filing the PR as a
draft?
  • Loading branch information
AlexanderKalistratov authored and vtavana committed Dec 2, 2024
1 parent 1df9295 commit acde046
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dpnp/tests/test_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def test_digitize_error(self):
bins_np = dpnp.asnumpy(bins_dp)
with pytest.raises(TypeError):
dpnp.digitize(x_np, bins_dp)
with pytest.raises(TypeError):
dpnp.digitize(x_dp, bins_np)

# bins ndim < 1
Expand Down

0 comments on commit acde046

Please sign in to comment.