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

Method unchecked_reference

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

Source from the content-addressed store, hash-verified

656 // Constructor for compile-time dimensions:
657 template <bool Dyn = Dynamic>
658 unchecked_reference(const void *data,
659 const ssize_t *shape,
660 const ssize_t *strides,
661 enable_if_t<!Dyn, ssize_t>)
662 : data_{reinterpret_cast<const unsigned char *>(data)}, dims_{Dims} {
663 for (size_t i = 0; i < (size_t) dims_; i++) {
664 shape_[i] = shape[i];
665 strides_[i] = strides[i];
666 }
667 }
668 // Constructor for runtime dimensions:
669 template <bool Dyn = Dynamic>
670 unchecked_reference(const void *data,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected