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

IntelPython / dpnp / 41452624322
84%

Build:
DEFAULT BRANCH: master
Ran 02 Nov 2026 02:48PM UTC
Jobs 1
Files 271
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

02 Nov 2026 01:23PM UTC coverage: 82.638%. Remained the same
41452624322

push

github

web-flow
Document that `dpnp.take` raises on an empty axis with non-empty indices (#3139)

`dpnp.take` raises `IndexError` for non-empty `indices` along an empty
axis, even when the result is empty. `numpy.take` raises only when the
result would be non-empty, so the two differ for inputs such as a `(0,
0)` array:

```python
a = numpy.empty((0, 0))
numpy.take(a, [0, 1], axis=0, mode="clip").shape  # (2, 0)

ia = dpnp.empty((0, 0))
dpnp.take(ia, [0, 1], axis=0, mode="clip")  # IndexError: cannot take non-empty indices from an empty axis
```

In `wrap` mode, NumPy 2.5.4 and older hang on the same call.

dpnp keeps its behavior on purpose. With an empty axis there is no
element for `wrap` or `clip` to map an index to, and NumPy's rule makes
the outcome depend on another dimension: it raises for a `(0, 3)` array
but not for a `(0, 0)` one. The Array API standard leaves out-of-bounds
indices unspecified, so both behaviors conform.

This PR adds a Notes section to the `dpnp.take` docstring that describes
the difference, and a test that covers it for both modes and both axes.
The test also checks that empty indices give the same empty result as
NumPy. Behavior is unchanged.

1604 of 2994 branches covered (53.57%)

Branch coverage included in aggregate %.

29438 of 34570 relevant lines covered (85.15%)

17674.24 hits per line

Jobs
ID Job ID Ran Files Coverage
1 41452624322.1 02 Nov 2026 02:48PM UTC 271
82.64
GitHub Action Run
Source Files on build 41452624322
  • Tree
  • List 271
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #41452624322
  • ba765164 on github
  • Prev Build on master (#41437916626)
  • Next Build on master (#41471777437)
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