Pybind11 wrapping of code using Eigen has changed

dm-dev
Tags: #<Tag:0x00007fd891131700>

(Russell Owen) #1

As of https://jira.lsstcorp.org/browse/DM-14834 we now use pybind11’s standard Eigen header to wrap C++ code that uses Eigen for arguments or return values. Formerly we used ndarray to perform this wrapping, but that support relied on undocumented internals of Eigen and prevented us from upgrading Eigen.

pybind11 Eigen wrappers are more permissive than ndarray Eigen wrappers about input data; pybind11 allows sequences of numbers, e.g. lists of floats for a 1-dimensional array and lists of lists of floats for a 2-dimensional array. Floats will be rounded to integers for integer Eigen objects.

One consequence is that in Python it is now possible to construct an lsst.geom.Point2I from an lsst.geom.Point2D, with rounded values.


Upgrade from Eigen 3.2.10 to Eigen 3.3.4