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

Function eigen_ref_array

include/pybind11/eigen/matrix.h:274–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272// non-writeable if the given type is const.
273template <typename props, typename Type>
274handle eigen_ref_array(Type &src, handle parent = none()) {
275 // none here is to get past array's should-we-copy detection, which currently always
276 // copies when there is no base. Setting the base to None should be harmless.
277 return eigen_array_cast<props>(src, parent, !std::is_const<Type>::value);
278}
279
280// Takes a pointer to some dense, plain Eigen type, builds a capsule around it, then returns a
281// numpy array that references the encapsulated data with a python-side reference to the capsule to

Callers

nothing calls this directly

Calls 1

noneClass · 0.85

Tested by

no test coverage detected