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

Function eigen_encapsulate

include/pybind11/eigen/matrix.h:285–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283// whether or not the Type of the pointer given is const.
284template <typename props, typename Type, typename = enable_if_t<is_eigen_dense_plain<Type>::value>>
285handle eigen_encapsulate(Type *src) {
286 capsule base(src, [](void *o) { delete static_cast<Type *>(o); });
287 return eigen_ref_array<props>(*src, base);
288}
289
290// Type caster for regular, dense matrix types (e.g. MatrixXd), but not maps/refs/etc. of dense
291// types.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected