mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
efa8726ff7
Fixes #738 The current check for conformability fails when given a 2D, 1xN or Nx1 input to a row-major or column-major, respectively, Eigen::Ref, leading to a copy-required state in the type_caster, but this later failed because the copy was also non-conformable because it had the same shape and strides (because a 1xN or Nx1 is both F and C contiguous). In such cases we can safely ignore the stride on the "1" dimension since it'll never be used: only the "N" dimension stride needs to match the Eigen::Ref stride, which both fixes the non-conformable copy problem, but also avoids a copy entirely as long as the "N" dimension has a compatible stride. |
||
---|---|---|
.. | ||
pybind11 |