{"action":"closed","issue":{"url":"https://api.github.com/repos/wjakob/pybind11/issues/5","labels_url":"https://api.github.com/repos/wjakob/pybind11/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/wjakob/pybind11/issues/5/comments","events_url":"https://api.github.com/repos/wjakob/pybind11/issues/5/events","html_url":"https://github.com/wjakob/pybind11/issues/5","id":112711925,"number":5,"title":"From Boost.Python to PYBIND11","user":{"login":"sgwoodjr","id":2515555,"avatar_url":"https://avatars.githubusercontent.com/u/2515555?v=3","gravatar_id":"","url":"https://api.github.com/users/sgwoodjr","html_url":"https://github.com/sgwoodjr","followers_url":"https://api.github.com/users/sgwoodjr/followers","following_url":"https://api.github.com/users/sgwoodjr/following{/other_user}","gists_url":"https://api.github.com/users/sgwoodjr/gists{/gist_id}","starred_url":"https://api.github.com/users/sgwoodjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgwoodjr/subscriptions","organizations_url":"https://api.github.com/users/sgwoodjr/orgs","repos_url":"https://api.github.com/users/sgwoodjr/repos","events_url":"https://api.github.com/users/sgwoodjr/events{/privacy}","received_events_url":"https://api.github.com/users/sgwoodjr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T01:37:34Z","updated_at":"2015-10-22T01:41:20Z","closed_at":"2015-10-22T01:41:20Z","body":"Hi,\r\nFirst off, great job on the library. It looks very promising. \r\n\r\nNow 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. \r\n\r\nHow would I achieve the same results using pybind11?\r\n\r\n```c++\r\nnamespace nbpl = num_util;\r\nnamespace bp = boost::python;\r\n\r\nbpn::array mybartlett(int L)\r\n{\r\n    // This is a call to my custom function that returns a custom vector\r\n    vec w = bartlett(L);\r\n\r\n    // This copies the data in w into the numpy array out\r\n    bpn::array out = nbpl::makeNum(w.begin(), w.size());\r\n\r\n    return out;\r\n}\r\n```"}}