Dan S - 2016-05-17

Hi, I have a static function that returns a std::pair<arma::Mat<double>, arma::Mat<double>>

In my interface file, I have:

%include "armanpy.i"
%fragment("armanpy_mat_typemaps"); // Needed for some reason to force inclusion of armanpy_mat_copy_to_numpy

%include "std_pair.i"
%template() std::pair<arma::Mat<double>,arma::Mat<double>>;

This compiles, and when i load my library into python, it seems to correctly map the output of my function to a Python tuple. However, the elements of that tuple are of type unknown:

<Swig Object="" of="" type="" 'unknown'="" at="" 0x7f4405ce83c0="">

How can I get SWIG to return numpy arrays for each element of the std::pair?