File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Example 1: Use an algorithm of the C++ library on a numpy array inplace
2929
3030 PYBIND11_PLUGIN(xtensor_python_test)
3131 {
32- import_numpy() //this is actually a macro
32+ import_numpy(); //this is actually a macro
3333 pybind11::module m("xtensor_python_test", "Test module for xtensor python bindings");
3434
3535 m.def("sum_of_sines", sum_of_sines,
@@ -80,7 +80,7 @@ Example 2: Create a universal function from a C++ scalar function
8080
8181 PYBIND11_PLUGIN(xtensor_python_test)
8282 {
83- import_numpy()
83+ import_numpy();
8484 py::module m("xtensor_python_test", "Test module for xtensor python bindings");
8585
8686 m.def("vectorized_func", xt::pyvectorize(scalar_func), "");
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Thus the basic skeleton of the module looks like:
2929
3030 PYBIND11_PLUGIN(plugin_name)
3131 {
32- import_numpy()
32+ import_numpy();
3333 pybind11::module m(//...
3434 //...
3535 return m.ptr();
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ int main(int argc, char* argv[])
2020{
2121 // Initialize all the things (google-test and Python interpreter)
2222 Py_Initialize ();
23- import_numpy ()
23+ import_numpy ();
2424 ::testing::InitGoogleTest (&argc, argv);
2525
2626 // Run test suite
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ int add(int i, int j)
5151
5252PYBIND11_PLUGIN (xtensor_python_test)
5353{
54- import_numpy ()
54+ import_numpy ();
55+
5556 py::module m (" xtensor_python_test" , " Test module for xtensor python bindings" );
5657
5758 m.def (" example1" , example1);
You can’t perform that action at this time.
0 commit comments