Skip to content

Added support for SWIG/Eigen type conversion for int & float matrices.#21

Open
rwpenney wants to merge 1 commit intoBiomechanical-ToolKit:masterfrom
rwpenney:master
Open

Added support for SWIG/Eigen type conversion for int & float matrices.#21
rwpenney wants to merge 1 commit intoBiomechanical-ToolKit:masterfrom
rwpenney:master

Conversation

@rwpenney
Copy link

@rwpenney rwpenney commented Jan 4, 2018

The "eigen.i" file is a very valuable resource for other projects that need to pass Eigen::MatrixXd matrices between C++ & Python via SWIG. Unfortunately, it currently only supports the exchange of matrices containing double-precision elements, corresponding to the Eigen::MatrixXd datatype.
This patch adds support for passing matrices of integers and floats, which represent the other major datatypes supported by the Eigen library. The patch should allow passing Eigen::MatrixXi and MatrixXf datatypes between C++ & Python.
The patch also tidies a small amount of unnecessary whitespace and semicolons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant