-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eigen type caster improvements (#215)
This commit redesigns the Eigen type casters to incorporate several improvements: - All of them are now restricted to supported numerical/boolean types, as determined by the compile-time trait ``is_ndarray_scalar_v``. - The casters now fully support Eigen's dynamic strides and only request contiguous memory from ``ndarray`` if this is actually needed. - Fixed potential undefined behavior when combining ``nb::cast()`` with ``Eigen::Ref<..>`` and ``Eigen::Map<..>``. - Disabled implicit conversions when casting ``Eigen::Map<..>`` (which are likely undesired/bug-proke when using this type). - Disabled implicit conversions when casting writable ``Eigen::Ref<..>``.
- Loading branch information
Showing
4 changed files
with
477 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.