Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ndarray
-
Labels:
-
Story Points:10
-
Epic Link:
-
Team:Alert Production
Description
Add ndarray::asEigenArray(array) and asEigenMatrix(array) which return Eigen::Map.
Also make it possible (or automatic) to eliminate ndarray::Array::asEigen and ndarray::EigenView when building against a more modern version of Eigen.
This is to help LSST upgrade Eigen, which will probably require eliminating our use of ndarray::EigenView.
Thank you for implementing this. Can you please say more about why you emulated ndarray::Array::asEigen such that asEigen(array) returns a Matrix map and ndarray::asEigen<Eigen::ArrayXpr>(array) returns an Array map.
I had been hoping for asEigenArray and asEigenMatrix for two reasons:
On the other hand if one can request more than just Matrix and Array then the flexibility may be helpful and we do have a few other asEigen functions that will confuse conversion regardless of what we call this.