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:
Jason Rhinelander
2016-08-04 15:24:41 -04:00
parent 19637536ac
commit 9ffb3dda5f
5 changed files with 84 additions and 5 deletions

View File

@@ -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