Closed
Description
Hi,
First off, great job on the library. It looks very promising.
Now to my question. I have a set of functions where each one returns a custom container class called vec. Below is an example wrapper using boost.python with num_util by Phil Austin. Basically num_util takes an iterator and returns a numpy array.
How would I achieve the same results using pybind11?
namespace nbpl = num_util;
namespace bp = boost::python;
bpn::array mybartlett(int L)
{
// This is a call to my custom function that returns a custom vector
vec w = bartlett(L);
// This copies the data in w into the numpy array out
bpn::array out = nbpl::makeNum(w.begin(), w.size());
return out;
}
Metadata
Metadata
Assignees
Labels
No labels