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

Method nbytes

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

Returns the total number of bytes used by the referenced data. Note that the actual span in memory may be larger if the referenced array has non-contiguous strides (e.g. for a slice).

Source from the content-addressed store, hash-verified

727 /// in memory may be larger if the referenced array has non-contiguous strides (e.g. for a
728 /// slice).
729 ssize_t nbytes() const { return size() * itemsize(); }
730};
731
732template <typename T, ssize_t Dims>

Callers

nothing calls this directly

Calls 1

itemsizeFunction · 0.85

Tested by

no test coverage detected