• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / dpnp / 32233785766
78%

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2026 12:46PM UTC
Jobs 1
Files 263
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Aug 2026 08:40AM UTC coverage: 78.458% (+0.001%) from 78.457%
32233785766

push

github

web-flow
Add proper exception handling for nested lists in `dpnp.repeat` (#3024)

This PR fixes #2972.

Passing a nested sequence as `repeats` to `dpnp.repeat` (e.g.
`np.repeat(x, [[4]])`) raised an unclear `TypeError` instead of a
meaningful error:

```python
>>> import dpnp as np
>>> x = np.array([3])
>>> np.repeat(x, [[4]])
TypeError: '<' not supported between instances of 'list' and 'int'
```

The sequence branch of `dpnp.tensor.repeat` special-cased a length-1
sequence by taking `repeats[0]` and comparing it to `0`, which fails
when that element is itself a list. It also had no dimensionality guard,
so a multi-element nested sequence could slip through as a 2-D array —
unlike the `usm_ndarray` branch, which already rejects `ndim > 1`.

The fix converts the sequence to an array up front and rejects a
dimensionality greater than 1, aligning with NumPy, which raises a
`ValueError` in this case:

```python
>>> np.repeat(x, [[4]])
ValueError: `repeats` sequence must be 0- or 1-dimensional, got 2 dimensions
```

The scalar fast path (`_repeat_by_scalar`) is preserved for the size-1
case.

1546 of 2898 branches covered (53.35%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 1 file covered. (100.0%)

26556 of 32920 relevant lines covered (80.67%)

8490.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32233785766.1 19 Aug 2026 12:46PM UTC 263
78.46
GitHub Action Run
Source Files on build 32233785766
  • Tree
  • List 263
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #32233785766
  • bd0da1f3 on github
  • Prev Build on master (#32135703392)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc