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

Method size

include/pybind11/numpy.h:717–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715 /// shapes
716 template <bool Dyn = Dynamic>
717 enable_if_t<!Dyn, ssize_t> size() const {
718 return std::accumulate(
719 shape_.begin(), shape_.end(), (ssize_t) 1, std::multiplies<ssize_t>());
720 }
721 template <bool Dyn = Dynamic>
722 enable_if_t<Dyn, ssize_t> size() const {
723 return std::accumulate(shape_, shape_ + ndim(), (ssize_t) 1, std::multiplies<ssize_t>());

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected