MCPcopy Create free account
hub / github.com/pybind/pybind11 / offset_at

Method offset_at

include/pybind11/numpy.h:1215–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1213 /// May throw if the index would lead to out of bounds access.
1214 template <typename... Ix>
1215 ssize_t offset_at(Ix... index) const {
1216 if ((ssize_t) sizeof...(index) > ndim()) {
1217 fail_dim_check(sizeof...(index), "too many indices for an array");
1218 }
1219 return byte_offset(ssize_t(index)...);
1220 }
1221
1222 ssize_t offset_at() const { return 0; }
1223

Callers 5

test_index_offsetFunction · 0.80
dataFunction · 0.80
offset_atFunction · 0.80
offset_at_tFunction · 0.80

Calls

no outgoing calls

Tested by 4

test_index_offsetFunction · 0.64
dataFunction · 0.64
offset_atFunction · 0.64
offset_at_tFunction · 0.64