-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i dont find api numpy.c_ #2
Comments
Hi @ronyuzhang, sorry for inconvenience. Practically it is still possible to use #include <pybind11/embed.h>
#include <pybind11/pybind11.h>
#include <pyscience11/numpy.h>
namespace py = pybind11;
namespace n11 = numpy11;
int main(void)
{
py::scoped_interpreter interpreter;
py::list li;
li.append(1);
li.append(2);
py::print(py::repr(li));
auto numpy = n11::import_numpy();
py::print(py::repr(numpy.attr("c_")[li]));
return 0;
} This yields the following result.
Does it satisfy your purpose? |
so great, thanks. It would be better if we could improve the documentation. something, i dont how to use api to achieve my work. |
Thanks for your comment. I will consider to prepare some documentation. |
i use c++ and call numpy , but i dont find c++ version of numpy.c_.
The text was updated successfully, but these errors were encountered: