Michele De Stefano's C++ Utilities
|
Contains several utilities for interfacing Python with Boost's uBLAS. More...
Functions | |
template<class M > | |
std::enable_if< mds_utils::ublas::is_matrix< M >::value, M >::type | get (PyObject *po) |
"From python" converter for Boost uBLAS matrices. More... | |
template<class ublas_mat_T > | |
std::enable_if< mds_utils::ublas::is_matrix< ublas_mat_T >::value, PyObject * >::type | to_python (const ublas_mat_T &mat) |
"To python" converter for Boost uBLAS matrices. More... | |
template<class M > | |
std::enable_if< mds_utils::ublas::is_compressed_matrix< M >::value, M >::type | get (PyObject *po) |
"From python" converter for Boost uBLAS compressed matrices. More... | |
template<class ublas_mat_T > | |
std::enable_if< mds_utils::ublas::is_compressed_matrix< ublas_mat_T >::value, PyObject * >::type | to_python (const ublas_mat_T &mat) |
"To python" converter for Boost uBLAS matrices. More... | |
template<class ublas_vec_T > | |
std::enable_if< mds_utils::ublas::is_vector< ublas_vec_T >::value, ublas_vec_T >::type | get (PyObject *po) |
"From python" converter for Boost uBLAS vectors. More... | |
template<class ublas_vec_T > | |
std::enable_if< mds_utils::ublas::is_vector< ublas_vec_T >::value, PyObject * >::type | to_python (const ublas_vec_T &v) |
"To python" converter for Boost uBLAS vectors. More... | |
Contains several utilities for interfacing Python with Boost's uBLAS.
Some of these utilities require the NumPy package to be installed.
|
inline |
"From python" converter for Boost uBLAS matrices.
Primary template for extracting a value from a Python object.
M | The data type of a dense uBLAS matrix. |
po | The Numpy array object to convert from. |
Definition at line 56 of file matrix.hpp.
|
inline |
"From python" converter for Boost uBLAS vectors.
Primary template for extracting a value from a Python object.
ublas_vec_T | The data type of a dense uBLAS vector. |
po | The Numpy array object to be converted. |
Definition at line 64 of file vector.hpp.
|
inline |
"From python" converter for Boost uBLAS compressed matrices.
Primary template for extracting a value from a Python object.
M | The data type of a uBLAS compressed_matrix. |
po | The Numpy array object to convert from. |
Definition at line 87 of file matrix_sparse.hpp.
References mds_utils::python::Obj::attr(), mds_utils::python::Obj::get_ownership(), and mds_utils::python::len().
|
inline |
"To python" converter for Boost uBLAS matrices.
ublas_mat_T | The data type of a dense uBLAS matrix. |
Definition at line 108 of file matrix.hpp.
|
inline |
"To python" converter for Boost uBLAS vectors.
This is the implementation that gets activated when dealing with real scalar data types.
ublas_vec_T | The data type of a dense uBLAS vector. |
Definition at line 120 of file vector.hpp.
|
inline |
"To python" converter for Boost uBLAS matrices.
This is the implementation that gets activated when dealing with real scalar data types.
ublas_mat_T | The data type of a dense uBLAS matrix. |
Definition at line 162 of file matrix_sparse.hpp.
References mds_utils::python::Obj::attr(), mds_utils::python::Obj::get_ownership(), mds_utils::python::Sequence_Base< Derived >::set(), and mds_utils::python::Obj::transfer().