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

Method size

include/pybind11/numpy.h:1131–1133  ·  view source on GitHub ↗

Total number of elements

Source from the content-addressed store, hash-verified

1129
1130 /// Total number of elements
1131 ssize_t size() const {
1132 return std::accumulate(shape(), shape() + ndim(), (ssize_t) 1, std::multiplies<ssize_t>());
1133 }
1134
1135 /// Byte size of a single element
1136 ssize_t itemsize() const { return dtype().itemsize(); }

Callers 15

c_stridesFunction · 0.45
f_stridesFunction · 0.45
buffer_infoMethod · 0.45
loadMethod · 0.45
castMethod · 0.45
loadMethod · 0.45
make_tupleFunction · 0.45
cast.hFile · 0.45
argsFunction · 0.45
kwargsFunction · 0.45
processFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected