If I tried to bind a sparse matrix using .def_readwrite, then I obtained
TypeError: No Python class registered for C++ class Eigen::SparseMatrix<double, 0, int>
If my understanding is correct, it is because Eigenpy is not yet registering references to Eigen's sparse matrices.
Additionally, I observed that when loading a pickable, the number of rows in an Eigen sparse matrix is always lower than the original matrix. I believe the error is coming from Eigenpy as well. I can provide more details if needed.
Thanks in advance,
Carlos