mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-11 17:00:34 +00:00
Eigen support for special matrix objects
Functions returning specialized Eigen matrices like Eigen::DiagonalMatrix and Eigen::SelfAdjointView--which inherit from EigenBase but not DenseBase--isn't currently allowed; such classes are explicitly copyable into a Matrix (by definition), and so we can support functions that return them by copying the value into a Matrix then casting that resulting dense Matrix into a numpy.ndarray. This commit does exactly that.
This commit is contained in:
@@ -50,3 +50,6 @@ diagonal_n(6) OK
|
||||
block(2,1,3,3) OK
|
||||
block(1,4,4,2) OK
|
||||
block(1,4,3,2) OK
|
||||
incr_diag OK
|
||||
symmetric_lower OK
|
||||
symmetric_upper OK
|
||||
|
||||
Reference in New Issue
Block a user