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

IntelPython / dpnp / 46978863208
85%

Build:
DEFAULT BRANCH: master
Ran 02 Dec 2026 11:11PM UTC
Jobs 1
Files 274
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 Dec 2026 09:51PM UTC coverage: 84.578% (+0.02%) from 84.557%
46978863208

push

github

web-flow
Fix out-of-range Python integers in binary elementwise functions (#3202)

Binary elementwise functions raised `OverflowError` or `ValueError` for
a Python integer that the array data type cannot hold, where NumPy
returns a result:

```python
import dpnp as np

x = np.array([1, 2], dtype=np.int32)
np.arctan2(x, 2**63)  # OverflowError: Python int too large to convert to C long
np.less(x, 2**64)  # ValueError: Unrecognized typenum 17 encountered.
np.logical_and(np.array([0, 1], dtype=np.int8), 300)  # OverflowError: Python integer 300 out of bounds for int8
```

This PR:
- In `dpnp.tensor`, converts a scalar operand once, to the data type the
kernel reads, instead of to the resolved data type and then into a 0-d
buffer of the kernel's data type. This fixes the functions that compute
in floating point for an integer or boolean array (`arctan2`, `hypot`,
`copysign`, `heaviside`, `logaddexp`, `logaddexp2`, `nextafter`,
`float_power`, `ldexp` with a Python integer mantissa, and `divide` of a
boolean array), and saves an allocation and a copy kernel per call.
- Gives the comparison functions NumPy's result for an integer array and
a Python integer outside the range of every integer data type, which
depends on the sign of the integer alone. The array is compared with the
maximum of its data type instead, so it is not cast.
- Converts such an integer to a float in `dpnp.divide`.
- Takes the truth value of a Python integer in `dpnp.logical_and`,
`dpnp.logical_or` and `dpnp.logical_xor` after checking that it fits
`int64`, as NumPy does. Outside that range they now raise
`OverflowError` for every array data type, as NumPy does, where they
used to return a result for a floating-point array.
- Raises `OverflowError` instead of a misleading `ValueError` in the
`dpnp.tensor` comparison functions, `dpnp.tensor.divide`,
`dpnp.tensor.isin` and `dpnp.tensor.searchsorted` for a Python integer
outside the `int64` and `uint64` ranges.

The Array API standard leaves all the... (continued)

1906 of 3156 branches covered (60.39%)

Branch coverage included in aggregate %.

74 of 74 new or added lines in 4 files covered. (100.0%)

30868 of 35594 relevant lines covered (86.72%)

39366.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 46978863208.1 02 Dec 2026 11:11PM UTC 274
84.58
GitHub Action Run
Source Files on build 46978863208
  • Tree
  • List 274
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #46978863208
  • 37716a1c on github
  • Prev Build on master (#46955005709)
  • Next Build on master (#46982888575)
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