mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-14 17:43:53 +00:00
9ffb3dda5f
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.
56 lines
1002 B
Plaintext
56 lines
1002 B
Plaintext
should_give_NOT_OK = NOT OK
|
|
fixed_r = OK
|
|
fixed_c = OK
|
|
pt_r(fixed_r) = OK
|
|
pt_c(fixed_c) = OK
|
|
pt_r(fixed_c) = OK
|
|
pt_c(fixed_r) = OK
|
|
dense_r = OK
|
|
dense_c = OK
|
|
pt_r(dense_r) = OK
|
|
pt_c(dense_c) = OK
|
|
pt_r(dense_c) = OK
|
|
pt_c(dense_r) = OK
|
|
sparse_r = OK
|
|
sparse_c = OK
|
|
pt_r(sparse_r) = OK
|
|
pt_c(sparse_c) = OK
|
|
pt_r(sparse_c) = OK
|
|
pt_c(sparse_r) = OK
|
|
double_row(first_row) = OK
|
|
double_col(first_row) = OK
|
|
double_row(first_col) = OK
|
|
double_col(first_col) = OK
|
|
double_mat_cm(0) = OK
|
|
double_mat_rm(0) = OK
|
|
double_mat_cm(1) = OK
|
|
double_mat_rm(1) = OK
|
|
double_mat_cm(2) = OK
|
|
double_mat_rm(2) = OK
|
|
cholesky1 OK
|
|
cholesky2 OK
|
|
cholesky3 OK
|
|
cholesky4 OK
|
|
cholesky5 OK
|
|
cholesky6 OK
|
|
diagonal() OK
|
|
diagonal_1() OK
|
|
diagonal_n(-5) OK
|
|
diagonal_n(-4) OK
|
|
diagonal_n(-3) OK
|
|
diagonal_n(-2) OK
|
|
diagonal_n(-1) OK
|
|
diagonal_n(0) OK
|
|
diagonal_n(1) OK
|
|
diagonal_n(2) OK
|
|
diagonal_n(3) OK
|
|
diagonal_n(4) OK
|
|
diagonal_n(5) OK
|
|
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
|