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.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| test_cmake_build | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| conftest.py | Loading commit data... | |
| constructor_stats.h | Loading commit data... | |
| object.h | Loading commit data... | |
| pybind11_tests.cpp | Loading commit data... | |
| pybind11_tests.h | Loading commit data... | |
| pytest.ini | Loading commit data... | |
| test_alias_initialization.cpp | Loading commit data... | |
| test_alias_initialization.py | Loading commit data... | |
| test_buffers.cpp | Loading commit data... | |
| test_buffers.py | Loading commit data... | |
| test_callbacks.cpp | Loading commit data... | |
| test_callbacks.py | Loading commit data... | |
| test_chrono.cpp | Loading commit data... | |
| test_chrono.py | Loading commit data... | |
| test_class_args.cpp | Loading commit data... | |
| test_class_args.py | Loading commit data... | |
| test_constants_and_functions.cpp | Loading commit data... | |
| test_constants_and_functions.py | Loading commit data... | |
| test_copy_move_policies.cpp | Loading commit data... | |
| test_copy_move_policies.py | Loading commit data... | |
| test_docstring_options.cpp | Loading commit data... | |
| test_docstring_options.py | Loading commit data... | |
| test_eigen.cpp | Loading commit data... | |
| test_eigen.py | Loading commit data... | |
| test_enum.cpp | Loading commit data... | |
| test_enum.py | Loading commit data... | |
| test_eval.cpp | Loading commit data... | |
| test_eval.py | Loading commit data... | |
| test_eval_call.py | Loading commit data... | |
| test_exceptions.cpp | Loading commit data... | |
| test_exceptions.py | Loading commit data... | |
| test_inheritance.cpp | Loading commit data... | |
| test_inheritance.py | Loading commit data... | |
| test_issues.cpp | Loading commit data... | |
| test_issues.py | Loading commit data... | |
| test_keep_alive.cpp | Loading commit data... | |
| test_keep_alive.py | Loading commit data... | |
| test_kwargs_and_defaults.cpp | Loading commit data... | |
| test_kwargs_and_defaults.py | Loading commit data... | |
| test_methods_and_attributes.cpp | Loading commit data... | |
| test_methods_and_attributes.py | Loading commit data... | |
| test_modules.cpp | Loading commit data... | |
| test_modules.py | Loading commit data... | |
| test_multiple_inheritance.cpp | Loading commit data... | |
| test_multiple_inheritance.py | Loading commit data... | |
| test_numpy_array.cpp | Loading commit data... | |
| test_numpy_array.py | Loading commit data... | |
| test_numpy_dtypes.cpp | Loading commit data... | |
| test_numpy_dtypes.py | Loading commit data... | |
| test_numpy_vectorize.cpp | Loading commit data... | |
| test_numpy_vectorize.py | Loading commit data... | |
| test_opaque_types.cpp | Loading commit data... | |
| test_opaque_types.py | Loading commit data... | |
| test_operator_overloading.cpp | Loading commit data... | |
| test_operator_overloading.py | Loading commit data... | |
| test_pickling.cpp | Loading commit data... | |
| test_pickling.py | Loading commit data... | |
| test_python_types.cpp | Loading commit data... | |
| test_python_types.py | Loading commit data... | |
| test_sequences_and_iterators.cpp | Loading commit data... | |
| test_sequences_and_iterators.py | Loading commit data... | |
| test_smart_ptr.cpp | Loading commit data... | |
| test_smart_ptr.py | Loading commit data... | |
| test_stl_binders.cpp | Loading commit data... | |
| test_stl_binders.py | Loading commit data... | |
| test_virtual_functions.cpp | Loading commit data... | |
| test_virtual_functions.py | Loading commit data... |