| 272 | // non-writeable if the given type is const. |
| 273 | template <typename props, typename Type> |
| 274 | handle 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 |