MCPcopy Create free account
hub / github.com/numpy/numpy / __npy_euclidean_division

Function __npy_euclidean_division

numpy/core/src/multiarray/iterators.c:1664–1674  ·  view source on GitHub ↗

compute l such as i = k * n + l, 0 <= l < |k| */

Source from the content-addressed store, hash-verified

1662
1663/* compute l such as i = k * n + l, 0 <= l < |k| */
1664static inline npy_intp
1665__npy_euclidean_division(npy_intp i, npy_intp n)
1666{
1667 npy_intp l;
1668
1669 l = i % n;
1670 if (l < 0) {
1671 l += n;
1672 }
1673 return l;
1674}
1675
1676#define _INF_SET_PTR_CIRCULAR(c) \
1677 lb = p->limits[c][0]; \

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected